1800
How can I highlight somehow the child bars of a summary bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL hSummary,hTask

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:Bars:Item("Task"):SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oItems := oG2antt:Items()
			hSummary := oItems:AddItem("Summary")
			oItems:AddBar(hSummary,"Project Summary","01/02/2001","01/02/2001","")
			hTask := oItems:InsertItem(hSummary,,"Task A")
			oItems:AddBar(hTask,"Task","01/02/2001","01/05/2001","K1")
			hTask := oItems:InsertItem(hSummary,,"Task B")
			oItems:AddBar(hTask,"Task","01/04/2001","01/08/2001","K2")
			hTask := oItems:InsertItem(hSummary,,"Task C")
			oItems:AddBar(hTask,"Task","01/06/2001","01/10/2001","K3")
			oItems:SetProperty("ExpandItem",hSummary,.T.)
			oItems:DefineSummaryBars(hSummary,"",-1,"<*>")
			oItems:SetProperty("ItemBar",hSummary,"",34/*exSummaryBarBackColor*/,65536)
			oItems:SetProperty("ItemBar",hSummary,"",35/*exSummaryBarBackColorTransparent*/,50)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1799
How do I change the color for the selected bars, without showing the frame arround

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2002"
			oChart:SetProperty("SelBarColor",0x7f0000ff)
			oChart:SetProperty("PaneWidth",.F.,48)
		oG2antt:Columns():Add("Task")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2002","01/04/2002","A")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/06/2002","01/10/2002","B")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","01/11/2002","01/14/2002","C")
			oItems:SetProperty("ItemBar",0,"<A B>",257/*exBarSelected*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1798
Is it possible to enumerate the activities/bars of critical path

PROCEDURE OnBarResize(oG2antt,Item,Key)
	oG2antt:Items():SchedulePDM(Item,Key)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3,h4,hSummary1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BarResize := {|Item,Key| OnBarResize(oG2antt,Item,Key)} /*Occurs when a bar is moved or resized.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:Bars:Item("Task"):SetProperty("Def",3/*exBarCaption*/,"<%=int(%269) > 0 ? (`<b>` + %269 + `</b>`) : ``%>")
		oItems := oG2antt:Items()
			hSummary1 := oItems:AddItem("Summary")
			oItems:SetProperty("ItemBold",hSummary1,.T.)
			oItems:AddBar(hSummary1,"Summary","01/02/2001","01/02/2001","sum")
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001")
			oItems:DefineSummaryBars(hSummary1,"sum",h1,"")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/02/2001","01/04/2001")
			oItems:DefineSummaryBars(hSummary1,"sum",h2,"")
			oItems:AddLink("L1",h1,"",h2,"")
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/02/2001","01/04/2001")
			oItems:DefineSummaryBars(hSummary1,"sum",h3,"")
			oItems:AddLink("L2",h2,"",h3,"")
			h4 := oItems:AddItem("Task 4")
			oItems:AddBar(h4,"Task","01/02/2001","01/04/2001")
			oItems:DefineSummaryBars(hSummary1,"sum",h4,"")
			oItems:AddLink("L3",h1,"",h4,"")
			oItems:SetProperty("DefSchedulePDM",5/*exPDMCriticalPathBarColor*/,65280)
			oItems:SchedulePDM(h1,"")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1797
How can I add a SF link

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3,h4,h5

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/25/2000"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/02/2001","01/05/2001","K2")
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/02/2001","01/05/2001","K3")
			h4 := oItems:AddItem("Task 4")
			oItems:AddBar(h4,"Task","01/02/2001","01/05/2001","K4")
			h5 := oItems:AddItem("Task 5")
			oItems:AddBar(h5,"Task","01/02/2001","01/05/2001","K5")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			oItems:AddLink("L2",h2,"K2",h3,"K3")
			oItems:AddLink("L3",h3,"K3",h4,"K4")
			oItems:AddLink("L4",h4,"K4",h5,"K5")
			oItems:SetProperty("Link","L4",6/*exLinkStartPos*/,0)
			oItems:SetProperty("Link","L4",7/*exLinkEndPos*/,2)
			oItems:SetProperty("Link","L4",8/*exLinkColor*/,65280)
			oItems:SchedulePDM(0,"K5")
		oG2antt:Chart():ShowLinks := 1/*exShowExtendedLinks*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1796
How do I get the Start and End date of a bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oG2antt:Debug := .T.
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,96)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","09/21/2006","09/24/2006","K1")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","09/22/2006","09/25/2006","K2")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","09/23/2006","09/26/2006","K3")
			h := oItems:ItemByIndex(1)
			oItems:SetProperty("ItemBold",h,.T.)
			DevOut( "Start of " )
			DevOut( Transform(oItems:FirstItemBar(h),"") )
			DevOut( Transform(oItems:ItemBar(h,oItems:FirstItemBar(h),1/*exBarStart*/),"") )
			DevOut( "End of  " )
			DevOut( Transform(oItems:FirstItemBar(h),"") )
			DevOut( Transform(oItems:ItemBar(h,oItems:FirstItemBar(h),2/*exBarEnd*/),"") )
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1795
I haven't found options to change/localize (in German, or my current regional settings) the captions/text/strings ( dates, tooltip ) that shows in the chart area (method 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:FirstWeekDay := oChart:LocFirstWeekDay()
			oChart:MonthNames := oChart:LocMonthNames()
			oChart:WeekDays := oChart:LocWeekDays()
			oChart:AMPM := oChart:LocAMPM()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:UnitScale := 4096/*exDay*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1794
Is it possible to change caption of the print and print preview, as it just says "Untitled Document", but I cant find the code that writes this caption

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oPrint
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/07/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
		oG2antt:EndUpdate()
		oPrint := CreateObject("Exontrol.Print")
			oPrint:Caption := "This is your new caption for print and print preview"
			oPrint:AutoRelease := .F.
			oPrint:PrintExt := oG2antt
			oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1793
Is it possible to specify the A4 paper size for the print preview
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oPrint
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/07/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
		oG2antt:EndUpdate()
		oPrint := CreateObject("Exontrol.Print")
			oPrint:SetProperty("Settings",0/*exPaperSize*/,9)
			oPrint:AutoRelease := .F.
			oPrint:PrintExt := oG2antt
			oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1792
Is it possible to tell the print preview to open up in "landscape mode" by default, not in "portrait mode"
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oPrint
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/07/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
		oG2antt:EndUpdate()
		oPrint := CreateObject("Exontrol.Print")
			oPrint:PageOrientation := 2/*exLandscape*/
			oPrint:AutoRelease := .F.
			oPrint:PrintExt := oG2antt
			oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1791
How do I prevent a caption outside the bar from overlapping other bars

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:Bars():CallMethod("Copy","Task","Default-Task")
			oChart:Bars:Item("Task"):OverlaidType := 4611/*exOverlaidBarsIncludeCaption+exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","A1","task")
			oItems:SetProperty("ItemBar",h,"A1",4/*exBarHAlignCaption*/,18)
			oItems:AddBar(h,"Task","01/06/2001","01/10/2001","A2","task")
			oItems:SetProperty("ItemBar",h,"A2",4/*exBarHAlignCaption*/,16)
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Default-Task","01/02/2001","01/04/2001","A1","task")
			oItems:SetProperty("ItemBar",h,"A1",4/*exBarHAlignCaption*/,18)
			oItems:AddBar(h,"Default-Task","01/06/2001","01/10/2001","A2","task")
			oItems:SetProperty("ItemBar",h,"A2",4/*exBarHAlignCaption*/,16)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1790
How do I clip/hide/align the bar's extra-caption/text based on the bar's size/width/length

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Clip")
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:DrawGridLines := -2/*exRowLines*/
		oChart := oG2antt:Chart()
			oChart:AllowResizeChart := 6/*exAllowResizeChartMiddle+exAllowResizeChartHeader*/
			oChart:DrawGridLines := -2/*exRowLines*/
			oChart:FirstVisibleDate := "12/23/2000"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,216)
			oBar := oChart:Bars:Item("Task")
				oBar:Pattern := 32/*exPatternBox*/
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 164,164,164 } )  , .F. ))
				oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
				oBar:SetProperty("EndColor",oBar:StartColor())
				oBar:OverlaidType := 4611/*exOverlaidBarsIncludeCaption+exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/
				oBar:Height := 15
			oChart:MinUnitWidth := oChart:UnitWidth()
		oItems := oG2antt:Items()
			h := oItems:AddItem("no clip, (0-2)")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",44/*exBarExtraCaption*/,"no clip, right(<b>2</b>)")
			oItems:SetProperty("ItemBar",h,"K1",45/*exBarExtraCaptionHAlign*/,2)
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K2")
			oItems:SetProperty("ItemBar",h,"K2",44/*exBarExtraCaption*/,"no clip, center(<b>1</b>)")
			oItems:SetProperty("ItemBar",h,"K2",45/*exBarExtraCaptionHAlign*/,1)
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K3","")
			oItems:SetProperty("ItemBar",h,"K3",44/*exBarExtraCaption*/,"no clip, left(<b>0</b>)")
			oItems:SetProperty("ItemBar",h,"K3",45/*exBarExtraCaptionHAlign*/,0)
			h := oItems:AddItem("clip, inside (3-5)")
			oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",44/*exBarExtraCaption*/,"clip, inside, right(<b>5</b>)")
			oItems:SetProperty("ItemBar",h,"K1",45/*exBarExtraCaptionHAlign*/,5)
			oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K2")
			oItems:SetProperty("ItemBar",h,"K2",44/*exBarExtraCaption*/,"clip, inside, center(<b>4</b>)")
			oItems:SetProperty("ItemBar",h,"K2",45/*exBarExtraCaptionHAlign*/,4)
			oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K3")
			oItems:SetProperty("ItemBar",h,"K3",44/*exBarExtraCaption*/,"clip, inside, left(<b>3</b>)")
			oItems:SetProperty("ItemBar",h,"K3",45/*exBarExtraCaptionHAlign*/,3)
			h := oItems:AddItem("hide on min width, clip if not fit, inside (6-8)")
			oItems:AddBar(h,"Task","12/26/2000","01/10/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",44/*exBarExtraCaption*/,"hide on min width, clip if not fit, inside, right(<b>8</b>)")
			oItems:SetProperty("ItemBar",h,"K1",45/*exBarExtraCaptionHAlign*/,8)
			oItems:AddBar(h,"Task","12/26/2000","01/10/2001","K2")
			oItems:SetProperty("ItemBar",h,"K2",44/*exBarExtraCaption*/,"hide on min width, clip if not fit, inside, center(<b>7</b>)")
			oItems:SetProperty("ItemBar",h,"K2",45/*exBarExtraCaptionHAlign*/,7)
			oItems:AddBar(h,"Task","12/26/2000","01/10/2001","K3")
			oItems:SetProperty("ItemBar",h,"K3",44/*exBarExtraCaption*/,"hide on min width, clip if not fit, inside, left(<b>6</b>)")
			oItems:SetProperty("ItemBar",h,"K3",45/*exBarExtraCaptionHAlign*/,6)
			h := oItems:AddItem("hide if not fit, no clip, inside (9-11)")
			oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",44/*exBarExtraCaption*/,"hide if not fit, no clip, inside, right(<b>11</b>)")
			oItems:SetProperty("ItemBar",h,"K1",45/*exBarExtraCaptionHAlign*/,11)
			oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K2")
			oItems:SetProperty("ItemBar",h,"K2",44/*exBarExtraCaption*/,"hide if not fit, no clip, center(<b>10</b>)")
			oItems:SetProperty("ItemBar",h,"K2",45/*exBarExtraCaptionHAlign*/,10)
			oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K3")
			oItems:SetProperty("ItemBar",h,"K3",44/*exBarExtraCaption*/,"hide if not fit, no clip, inside, left(<b>9</b>)")
			oItems:SetProperty("ItemBar",h,"K3",45/*exBarExtraCaptionHAlign*/,9)
			h := oItems:AddItem("no clip, inside, outside (12-14)")
			oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",44/*exBarExtraCaption*/,"no clip, inside, outside, right(<b>14</b>)")
			oItems:SetProperty("ItemBar",h,"K1",45/*exBarExtraCaptionHAlign*/,14)
			oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K2")
			oItems:SetProperty("ItemBar",h,"K2",44/*exBarExtraCaption*/,"no clip, inside, outside, center(<b>13</b>)")
			oItems:SetProperty("ItemBar",h,"K2",45/*exBarExtraCaptionHAlign*/,13)
			oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K3")
			oItems:SetProperty("ItemBar",h,"K3",44/*exBarExtraCaption*/,"no clip, inside, outside, left(<b>12</b>)")
			oItems:SetProperty("ItemBar",h,"K3",45/*exBarExtraCaptionHAlign*/,12)
			h := oItems:AddItem("no clip, outside (16-18)")
			oItems:AddBar(h,"Task","12/30/2000","01/06/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",44/*exBarExtraCaption*/,"no clip, outside, right(<b>18</b>)")
			oItems:SetProperty("ItemBar",h,"K1",45/*exBarExtraCaptionHAlign*/,18)
			oItems:AddBar(h,"Task","12/30/2000","01/06/2001","K2")
			oItems:SetProperty("ItemBar",h,"K2",44/*exBarExtraCaption*/,"no clip, outside, center(<b>17</b>)")
			oItems:SetProperty("ItemBar",h,"K2",45/*exBarExtraCaptionHAlign*/,17)
			oItems:AddBar(h,"Task","12/30/2000","01/06/2001","K3")
			oItems:SetProperty("ItemBar",h,"K3",44/*exBarExtraCaption*/,"no clip, outside, left(<b>16</b>)")
			oItems:SetProperty("ItemBar",h,"K3",45/*exBarExtraCaptionHAlign*/,16)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1789
What options do I have to show the links between bars (rectangular SEV, starts vertically, ends vertically)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:AntiAliasing := .T.
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:NonworkingDays := 0
			oChart:LinksWidth := 2
		oItems := oG2antt:Items()
			oItems:AddItem("")
			h3 := oItems:AddItem("Task 3")
			oItems:AddItem("")
			oItems:AddBar(h3,"Task","01/13/2001","01/15/2001","K3")
			h1 := oItems:AddItem("Task 1")
			oItems:AddItem("")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/07/2001","01/09/2001","K2")
			oItems:AddItem("")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			oItems:AddLink("L2",h2,"K2",h3,"K3")
			oItems:SetProperty("Link","<*>",15/*exLinkShowRound*/,5)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1788
What options do I have to show the links between bars (rectangular SV, starts vertically, ends horizontally)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:AntiAliasing := .T.
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:NonworkingDays := 0
			oChart:LinksWidth := 2
		oItems := oG2antt:Items()
			oItems:AddItem("")
			h3 := oItems:AddItem("Task 3")
			oItems:AddItem("")
			oItems:AddBar(h3,"Task","01/13/2001","01/15/2001","K3")
			h1 := oItems:AddItem("Task 1")
			oItems:AddItem("")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/07/2001","01/09/2001","K2")
			oItems:AddItem("")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			oItems:AddLink("L2",h2,"K2",h3,"K3")
			oItems:SetProperty("Link","<*>",15/*exLinkShowRound*/,4)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1787
What options do I have to show the links between bars (rectangular EV, starts horizontally, ends vertically)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:AntiAliasing := .T.
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:NonworkingDays := 0
			oChart:LinksWidth := 2
		oItems := oG2antt:Items()
			oItems:AddItem("")
			h3 := oItems:AddItem("Task 3")
			oItems:AddItem("")
			oItems:AddBar(h3,"Task","01/13/2001","01/15/2001","K3")
			h1 := oItems:AddItem("Task 1")
			oItems:AddItem("")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/07/2001","01/09/2001","K2")
			oItems:AddItem("")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			oItems:AddLink("L2",h2,"K2",h3,"K3")
			oItems:SetProperty("Link","<*>",15/*exLinkShowRound*/,3)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1786
What options do I have to show the links between bars (straight)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:AntiAliasing := .T.
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:NonworkingDays := 0
			oChart:LinksWidth := 2
		oItems := oG2antt:Items()
			oItems:AddItem("")
			h3 := oItems:AddItem("Task 3")
			oItems:AddItem("")
			oItems:AddBar(h3,"Task","01/13/2001","01/15/2001","K3")
			h1 := oItems:AddItem("Task 1")
			oItems:AddItem("")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/07/2001","01/09/2001","K2")
			oItems:AddItem("")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			oItems:AddLink("L2",h2,"K2",h3,"K3")
			oItems:SetProperty("Link","<*>",15/*exLinkShowRound*/,2)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1785
What options do I have to show the links between bars (direct)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:AntiAliasing := .T.
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:NonworkingDays := 0
			oChart:LinksWidth := 2
		oItems := oG2antt:Items()
			oItems:AddItem("")
			h3 := oItems:AddItem("Task 3")
			oItems:AddItem("")
			oItems:AddBar(h3,"Task","01/13/2001","01/15/2001","K3")
			h1 := oItems:AddItem("Task 1")
			oItems:AddItem("")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/07/2001","01/09/2001","K2")
			oItems:AddItem("")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			oItems:AddLink("L2",h2,"K2",h3,"K3")
			oItems:SetProperty("Link","<*>",15/*exLinkShowRound*/,1)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1784
What options do I have to show the links between bars (round)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:AntiAliasing := .T.
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:NonworkingDays := 0
			oChart:LinksWidth := 2
		oItems := oG2antt:Items()
			oItems:AddItem("")
			h3 := oItems:AddItem("Task 3")
			oItems:AddItem("")
			oItems:AddBar(h3,"Task","01/13/2001","01/15/2001","K3")
			h1 := oItems:AddItem("Task 1")
			oItems:AddItem("")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/07/2001","01/09/2001","K2")
			oItems:AddItem("")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			oItems:AddLink("L2",h2,"K2",h3,"K3")
			oItems:SetProperty("Link","<*>",15/*exLinkShowRound*/,-1)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1783
What options do I have to show the links between bars (rectangular, default)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:AntiAliasing := .T.
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:NonworkingDays := 0
			oChart:LinksWidth := 2
		oItems := oG2antt:Items()
			oItems:AddItem("")
			h3 := oItems:AddItem("Task 3")
			oItems:AddItem("")
			oItems:AddBar(h3,"Task","01/13/2001","01/15/2001","K3")
			h1 := oItems:AddItem("Task 1")
			oItems:AddItem("")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/07/2001","01/09/2001","K2")
			oItems:AddItem("")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			oItems:AddLink("L2",h2,"K2",h3,"K3")
			oItems:SetProperty("Link","<*>",15/*exLinkShowRound*/,0)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1782
I have a question about whether the control has the functionality to add two bars on the same item, as one would correspond to the item bar and another bar their progress, but progress is required to show dividedly at different times outside the activity bar item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1,oBar2
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,64)
			oBar := oChart:Bars():CallMethod("Copy","Progress","TProgressD")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
				oBar:Shape := 20/*exShapeThinDown*/
			oBar1 := oChart:Bars():CallMethod("Copy","Progress","TProgressC")
				oBar1:SetProperty("Def",4/*exBarHAlignCaption*/,18)
			oBar2 := oChart:Bars():CallMethod("Copy","Progress","TProgressU")
				oBar2:SetProperty("Def",4/*exBarHAlignCaption*/,18)
				oBar2:Shape := 18/*exShapeThinUp*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task")
			oItems:AddBar(h,"Task","09/25/2006","09/30/2006","T1")
			oItems:AddBar(h,"TProgressU","09/25/2006","10/04/2006","TP1")
			oItems:GroupBars(h,"T1",.T.,h,"TP1",.T.,3)
			oItems:SetProperty("ItemBar",h,"TP1",3/*exBarCaption*/,"<font ;6>progress up")
			h := oItems:AddItem("Task")
			oItems:AddBar(h,"Task","09/26/2006","10/01/2006","T2")
			oItems:AddBar(h,"TProgressC","09/26/2006","10/05/2006","TP2")
			oItems:GroupBars(h,"T2",.T.,h,"TP2",.T.,3)
			oItems:SetProperty("ItemBar",h,"TP2",3/*exBarCaption*/,"<font ;6>progress center")
			h := oItems:AddItem("Task")
			oItems:AddBar(h,"Task","09/25/2006","09/30/2006","T3")
			oItems:AddBar(h,"TProgressD","09/25/2006","10/06/2006","TP3")
			oItems:GroupBars(h,"T3",.T.,h,"TP3",.T.,3)
			oItems:SetProperty("ItemBar",h,"TP3",3/*exBarCaption*/,"<font ;6>progress down")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1781
I have a column of date-type, the question is how can I move the associated bar, instead of resizing it (summary, inclusive, working)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1
	LOCAL oBars
	LOCAL oChart
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oItems
	LOCAL h,h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:MarkSearchColumn := .F.
		oG2antt:Indent := 11
		oG2antt:HasLines := 1/*exSolidLine*/
		oG2antt:Items():AllowCellValueToItemBar := .T.
		oColumns := oG2antt:Columns()
			oColumns:Add("Tasks")
			oColumn := oColumns:Add("Start")
				oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,544)
				oColumn:Editor():EditType := 7/*DateType*/
				oColumn:LevelKey := 1
			oColumn1 := oColumns:Add("End")
				oColumn1:SetProperty("Def",18/*exCellValueToItemBarProperty*/,546)
				oColumn1:Editor():EditType := 7/*DateType*/
				oColumn1:LevelKey := 1
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:AllowLinkBars := .F.
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,224)
			oBars := oChart:Bars()
				oBar := oBars:Add("Underline")
					oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
					oBar:Shape := 20/*exShapeThinDown*/
				oBar1 := oBars:Add("Task:Underline")
					oBar1:Shortcut := "T"
					oBar1:SetProperty("Def",20/*exBarKeepWorkingCount*/,.T.)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project")
			oItems:AddBar(h,"Summary","09/21/2006","10/03/2006")
			h1 := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(h1,"T","09/21/2006","09/24/2006")
			h2 := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(h2,"T","09/24/2006","09/28/2006")
			h3 := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(h3,"T","09/28/2006","10/03/2006")
			oItems:DefineSummaryBars(h,"",h1,"")
			oItems:DefineSummaryBars(h,"",h2,"")
			oItems:DefineSummaryBars(h,"",h3,"")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ItemBold",h,.T.)
			oItems:SetProperty("ItemBar",h,"",544/*exBarMoveStart*/,"09/22/2006")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1780
I have a column of date-type, the question is how can I move the associated bar, instead of resizing it (summary)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oItems
	LOCAL h,h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:MarkSearchColumn := .F.
		oG2antt:Indent := 11
		oG2antt:HasLines := 1/*exSolidLine*/
		oG2antt:Items():AllowCellValueToItemBar := .T.
		oColumns := oG2antt:Columns()
			oColumns:Add("Tasks")
			oColumn := oColumns:Add("Start")
				oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,544)
				oColumn:Editor():EditType := 7/*DateType*/
				oColumn:LevelKey := 1
			oColumn1 := oColumns:Add("End")
				oColumn1:SetProperty("Def",18/*exCellValueToItemBarProperty*/,545)
				oColumn1:Editor():EditType := 7/*DateType*/
				oColumn1:LevelKey := 1
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:AllowLinkBars := .F.
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,224)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project")
			oItems:AddBar(h,"Summary","09/21/2006","10/03/2006")
			h1 := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(h1,"Task","09/21/2006","09/24/2006")
			h2 := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(h2,"Task","09/24/2006","09/28/2006")
			h3 := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(h3,"Task","09/28/2006","10/03/2006")
			oItems:DefineSummaryBars(h,"",h1,"")
			oItems:DefineSummaryBars(h,"",h2,"")
			oItems:DefineSummaryBars(h,"",h3,"")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ItemBold",h,.T.)
			oItems:SetProperty("ItemBar",h,"",544/*exBarMoveStart*/,"09/22/2006")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1779
Is it possible to programmatically move all bars of specified key to end at specified date (inclusive)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Debug := .T.
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task A.1"),"Task","01/01/2001","01/06/2001","A")
			oItems:AddBar(oItems:AddItem("Task A.2"),"Task","01/02/2001","01/07/2001","A")
			oItems:AddBar(oItems:AddItem("Task B.1"),"Task","01/03/2001","01/08/2001","B")
			oItems:AddBar(oItems:AddItem("Task B.2"),"Task","01/04/2001","01/09/2001","B")
			oItems:SetProperty("ItemBar",0,"<A*>",546/*exBarMoveEndInclusive*/,"01/02/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1778
Is it possible to programmatically move all bars to end at specified date (inclusive)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Debug := .T.
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task A.1"),"Task","01/01/2001","01/06/2001","A")
			oItems:AddBar(oItems:AddItem("Task A.2"),"Task","01/02/2001","01/07/2001","A")
			oItems:AddBar(oItems:AddItem("Task B.1"),"Task","01/03/2001","01/08/2001","B")
			oItems:AddBar(oItems:AddItem("Task B.2"),"Task","01/04/2001","01/09/2001","B")
			oItems:SetProperty("ItemBar",0,"<*>",546/*exBarMoveEndInclusive*/,"01/02/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1777
Is it possible to programmatically move all bars of specified key to end at specified date

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Debug := .T.
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task A.1"),"Task","01/01/2001","01/06/2001","A")
			oItems:AddBar(oItems:AddItem("Task A.2"),"Task","01/02/2001","01/07/2001","A")
			oItems:AddBar(oItems:AddItem("Task B.1"),"Task","01/03/2001","01/08/2001","B")
			oItems:AddBar(oItems:AddItem("Task B.2"),"Task","01/04/2001","01/09/2001","B")
			oItems:SetProperty("ItemBar",0,"<A*>",545/*exBarMoveEnd*/,"01/02/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1776
Is it possible to programmatically move all bars to end at specified date

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Debug := .T.
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task A.1"),"Task","01/01/2001","01/06/2001","A")
			oItems:AddBar(oItems:AddItem("Task A.2"),"Task","01/02/2001","01/07/2001","A")
			oItems:AddBar(oItems:AddItem("Task B.1"),"Task","01/03/2001","01/08/2001","B")
			oItems:AddBar(oItems:AddItem("Task B.2"),"Task","01/04/2001","01/09/2001","B")
			oItems:SetProperty("ItemBar",0,"<*>",545/*exBarMoveEnd*/,"01/02/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1775
Is it possible to programmatically move all bars of specified key to start at specified date

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Debug := .T.
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task A.1"),"Task","01/01/2001","01/06/2001","A")
			oItems:AddBar(oItems:AddItem("Task A.2"),"Task","01/02/2001","01/07/2001","A")
			oItems:AddBar(oItems:AddItem("Task B.1"),"Task","01/03/2001","01/08/2001","B")
			oItems:AddBar(oItems:AddItem("Task B.2"),"Task","01/04/2001","01/09/2001","B")
			oItems:SetProperty("ItemBar",0,"<A*>",544/*exBarMoveStart*/,"01/02/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1774
Is it possible to programmatically move all bars to start at specified date

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Debug := .T.
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task A.1"),"Task","01/01/2001","01/06/2001","A")
			oItems:AddBar(oItems:AddItem("Task A.2"),"Task","01/02/2001","01/07/2001","A")
			oItems:AddBar(oItems:AddItem("Task B.1"),"Task","01/03/2001","01/08/2001","B")
			oItems:AddBar(oItems:AddItem("Task B.2"),"Task","01/04/2001","01/09/2001","B")
			oItems:SetProperty("ItemBar",0,"<*>",544/*exBarMoveStart*/,"01/02/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1773
Is it possible to programmatically move all bars of specified key

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Debug := .T.
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task A.1"),"Task","01/01/2001","01/06/2001","A")
			oItems:AddBar(oItems:AddItem("Task A.2"),"Task","01/02/2001","01/07/2001","A")
			oItems:AddBar(oItems:AddItem("Task B.1"),"Task","01/03/2001","01/08/2001","B")
			oItems:AddBar(oItems:AddItem("Task B.2"),"Task","01/04/2001","01/09/2001","B")
			oItems:SetProperty("ItemBar",0,"<A*>",514/*exBarMove*/,2)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1772
Is it possible to programmatically move all bars

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Debug := .T.
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task A.1"),"Task","01/01/2001","01/06/2001","A")
			oItems:AddBar(oItems:AddItem("Task A.2"),"Task","01/02/2001","01/07/2001","A")
			oItems:AddBar(oItems:AddItem("Task B.1"),"Task","01/03/2001","01/08/2001","B")
			oItems:AddBar(oItems:AddItem("Task B.2"),"Task","01/04/2001","01/09/2001","B")
			oItems:SetProperty("ItemBar",0,"<*>",514/*exBarMove*/,2)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1771
How can I programmatically move a bar, so it ends at specified date (inclusive)
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/01/2001","01/06/2001","A")
			oItems:SetProperty("ItemBar",h,"A",546/*exBarMoveEndInclusive*/,"01/04/2001")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1770
How can I programmatically move a bar, so it ends at specified date
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/01/2001","01/06/2001","A")
			oItems:SetProperty("ItemBar",h,"A",545/*exBarMoveEnd*/,"01/04/2001")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1769
How can I programmatically move a bar, so it starts at specified date
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/01/2001","01/06/2001","A")
			oItems:SetProperty("ItemBar",h,"A",544/*exBarMoveStart*/,"01/04/2001")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1768
I can’t figure out how to control the date and time format (in level 0, 1 and 2) when the user click on the OverviewZoom bottom

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oLevel,oLevel1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:HeaderHeight := 22
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2016"
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:LevelCount := 2
			oChart:DrawLevelSeparator := 2/*exLevelSolidLine*/
			oChart:AllowResizeChart := 6/*exAllowResizeChartMiddle+exAllowResizeChartHeader*/
			oChart:MaxUnitWidth := 196
			oLevel := oChart:Level(0)
				oLevel:Alignment := 17/*exHOutside+CenterAlignment*/
				oLevel:DrawTickLines := 2/*exLevelSolidLine*/
			oLevel1 := oChart:Level(1)
				oLevel1:DrawTickLines := 65/*exLevelMiddleLine+exLevelDotLine*/
				oLevel1:DrawTickLinesFrom(0,2/*exLevelSolidLine*/)
				oLevel1:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
			oChart:OverviewVisible := 2/*exOverviewShowAllVisible*/
			oChart:AllowOverviewZoom := 1/*exAlwaysZoom*/
			oChart:UnitWidth := 24
			oChart:SetProperty("Label",16777216/*exSecond*/,"")
			oChart:SetProperty("Label",1048576/*exMinute*/,"")
			oChart:SetProperty("Label",65536/*exHour*/,"")
			oChart:SetProperty("Label",256/*exWeek*/,"")
			oChart:SetProperty("Label",4096/*exDay*/,"<font ;6><%d%><|><%d%><|><%d%> <fgcolor=A0A0A0><off -4><%d1%><|><%d%> <fgcolor=A0A0A0><off -4><%d2%><|><%d%> <fgcolor=A0A0A0><off -4><%d3%><|><%d%> <fgcolor=A0A0A0><off -4><%dddd%><||><||>4096")
			oChart:UnitScale := 4096/*exDay*/
			oChart:ScrollTo(oChart:FirstVisibleDate(),1)
		oG2antt:Columns():Add("Default")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1767
Can I use GroupBars with OverlaidType method

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h,h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oG2antt:Debug := .T.
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:Bars:Item("Task"):OverlaidType := 3/*exOverlaidBarsStack*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project")
			oItems:AddBar(h,"Summary","09/21/2006","10/04/2006")
			h1 := oItems:InsertItem(h,,"Tasks")
			oItems:AddBar(h1,"Task","09/21/2006","09/26/2006","h1")
			h2 := h1
			oItems:AddBar(h2,"Task","09/25/2006","09/30/2006","h2")
			oItems:AddLink("L1",h1,"h1",h2,"h2")
			h3 := h1
			oItems:AddBar(h3,"Task","09/29/2006","10/04/2006","h3")
			oItems:AddLink("L2",h2,"h2",h3,"h3")
			oItems:DefineSummaryBars(h,"",h1,"h1")
			oItems:DefineSummaryBars(h,"",h2,"h2")
			oItems:DefineSummaryBars(h,"",h3,"h3")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ItemBold",h,.T.)
			oItems:GroupBars(h1,"h1",.F.,h2,"h2",.T.,31,"0;5;-1")
			oItems:GroupBars(h2,"h2",.F.,h3,"h3",.T.,31,"0;5;-1")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1766
How do I change the link's lag so I can schedule bars to start later (with nonworking part)

PROCEDURE OnBarResizing(oG2antt,Item,Key)
	oG2antt:Items():SchedulePDM(Item,Key)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3,h4

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BarResizing := {|Item,Key| OnBarResizing(oG2antt,Item,Key)} /*Occurs when a bar is moving or resizing.*/

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 22
		oG2antt:HeaderHeight := oG2antt:DefaultItemHeight()
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oG2antt:AntiAliasing := .T.
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:LinksStyle := 0/*exLinkSolid*/
			oChart:SetProperty("LinksColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,48)
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("Def",20/*exBarKeepWorkingCount*/,.T.)
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
				oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 190,190,190 } )  , .F. ))
				oBar:SetProperty("EndColor",oBar:StartColor())
				oBar:Pattern := 32/*exPatternBox*/
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/05/2001","K1","FS lag=0 (default)")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/02/2001","01/05/2001","K2","FS lag=4")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/02/2001","01/05/2001","K3","FS lag=-1")
			oItems:AddLink("L2",h2,"K2",h3,"K3")
			oItems:SetProperty("Link","L2",16/*exLinkPDMWorkingDelay*/,4)
			h4 := oItems:AddItem("Task 4")
			oItems:AddBar(h4,"Task","01/02/2001","01/05/2001","K4")
			oItems:AddLink("L3",h3,"K3",h4,"K4")
			oItems:SetProperty("Link","L3",16/*exLinkPDMWorkingDelay*/,-1)
			oItems:SchedulePDM(0,"K1")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1765
How do I change the link's lag so I can schedule bars to start later (without nonworking part)

PROCEDURE OnBarResizing(oG2antt,Item,Key)
	oG2antt:Items():SchedulePDM(Item,Key)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3,h4

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BarResizing := {|Item,Key| OnBarResizing(oG2antt,Item,Key)} /*Occurs when a bar is moving or resizing.*/

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 22
		oG2antt:HeaderHeight := oG2antt:DefaultItemHeight()
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oG2antt:AntiAliasing := .T.
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:LinksStyle := 0/*exLinkSolid*/
			oChart:SetProperty("LinksColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
			oChart:LevelCount := 2
			oChart:NonworkingDays := 0
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,48)
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
				oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 190,190,190 } )  , .F. ))
				oBar:SetProperty("EndColor",oBar:StartColor())
				oBar:Pattern := 32/*exPatternBox*/
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/05/2001","K1","FS lag=0 (default)")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/02/2001","01/05/2001","K2","FS lag=4")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/02/2001","01/05/2001","K3","FS lag=-1")
			oItems:AddLink("L2",h2,"K2",h3,"K3")
			oItems:SetProperty("Link","L2",17/*exLinkPDMDelay*/,4)
			h4 := oItems:AddItem("Task 4")
			oItems:AddBar(h4,"Task","01/02/2001","01/05/2001","K4")
			oItems:AddLink("L3",h3,"K3",h4,"K4")
			oItems:SetProperty("Link","L3",17/*exLinkPDMDelay*/,-1)
			oItems:SchedulePDM(0,"K1")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1764
Is it possible to select the entire row/line, when user clicks the first column, and select individually the rest of cells, while user clicks any other column

PROCEDURE OnAddGroupItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Summary",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
		oItems:DefineSummaryBars(Item,"",-3,"")
RETURN

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Task",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
RETURN

PROCEDURE OnMouseDown(oG2antt,Button,Shift,X,Y)
	LOCAL i
	i := oG2antt:ItemFromPoint(-1,-1,c,hit)
	oG2antt:FullRowSelect := oG2antt:Columns:Item(c):Data()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddGroupItem := {|Item| OnAddGroupItem(oG2antt,Item)} /*Occurs after a new Group Item has been inserted to Items collection.*/
		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/
		oG2antt:MouseDown := {|Button,Shift,X,Y| OnMouseDown(oG2antt,Button,Shift,X,Y)} /*Occurs when the user presses a mouse button.*/

		oG2antt:BeginUpdate()
		oG2antt:HeaderHeight := 22
		oG2antt:HeaderAppearance := 1/*Flat*/
		oG2antt:SetProperty("BackColorLock",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:SetProperty("BackColorHeader",oG2antt:BackColorLock())
		oG2antt:HasLines := 0/*exNoLine*/
		oG2antt:ColumnAutoResize := .F.
		oG2antt:SortBarVisible := .F.
		oG2antt:AllowGroupBy := .T.
		oG2antt:ReadOnly := -1/*exReadOnly*/
		oG2antt:ShowFocusRect := .F.
		oG2antt:CountLockedColumns := 1
		oG2antt:AutoDrag := 16/*exAutoDragScroll*/
		oG2antt:SingleSort := .F.
		oG2antt:ColumnsAllowSizing := .T.
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oG2antt:GridLineStyle := 48/*exGridLinesSolid*/
		oG2antt:SetProperty("GridLineColor",AutomationTranslateColor( GraMakeRGBColor  ( { 220,220,220 } )  , .F. ))
		oG2antt:Chart():FirstVisibleDate := "09/01/1994"
		oG2antt:Chart():LevelCount := 2
		oG2antt:Chart():SetProperty("PaneWidth",.F.,256)
		oG2antt:SetProperty("BackColorSortBar",oG2antt:BackColor())
		oG2antt:ColumnAutoResize := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:Columns:Item(0):Data := -1
		oG2antt:Layout := "singlesort=" + CHR(34) + "C5:1" + CHR(34) + ";multiplesort=" + CHR(34) + " C1:2" + CHR(34) + ""
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1763
I've also hit a strange problem with the BeforeExpandItem event - the Cancel parameter is declared as const in Delphi when I believe it should be declared as var or out so I can use it to return OleVariant(True) to cancel the operation, or am I missing something, or how can I disable expanding / collapsing the items
PROCEDURE OnBeforeExpandItem(oG2antt,Item,Cancel)
	oG2antt:SetProperty("EventParam",1,.T.)
RETURN

PROCEDURE OnEvent(oG2antt,EventID)
	DevOut( Transform(oG2antt:EventParam(-2),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeforeExpandItem := {|Item,Cancel| OnBeforeExpandItem(oG2antt,Item,Cancel)} /*Fired before an item is about to be expanded (collapsed).*/
		oG2antt:Event := {|EventID| OnEvent(oG2antt,EventID)} /*Notifies the application once the control fires an event.*/

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:Columns():Add("Default")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root A")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root B")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1762
Is there any way I can get rid / hide of the vertical blue lines ( today, selected date )
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:LevelCount := 2
			oChart:SetProperty("MarkSelectDateColor",oChart:BackColor())
			oChart:SetProperty("MarkTodayColor",oChart:BackColor())
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1761
Is it possible to search for a bar through items only ( not including the locked items )

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems,oItems1
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Debug := .T.
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/31/2015"
		oG2antt:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor  ( { 250,250,250 } )  , .F. ))
		oG2antt:ShowLockedItems := .T.
		oG2antt:Columns():Add("Column")
		oColumn := oG2antt:Columns():Add("Find")
			oColumn:SetProperty("Def",17/*exCellValueFormat*/,1)
			oColumn:Visible := .F.
			oColumn:FormatColumn := "int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` "
		oG2antt:Chart():ColumnsFormatLevel := "1"
		oItems := oG2antt:Items()
			oItems:SetProperty("LockedItemCount",0/*exTop*/,3)
			h := oItems:LockedItem(0/*exTop*/,0)
			oItems:SetProperty("CellValue",h,0,"locked-top 1")
			oItems:AddBar(h,"Task","01/04/2016","01/08/2016","T1")
			h := oItems:LockedItem(0/*exTop*/,1)
			oItems:SetProperty("CellValue",h,0,"locked-top 2")
			oItems:AddBar(h,"Task","01/05/2016","01/09/2016","T2")
			h := oItems:LockedItem(0/*exTop*/,2)
			oItems:SetProperty("SelectItem",h,.F.)
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemHeight",h,2)
			oItems:AddBar(oItems:AddItem("un-locked item 1"),"Task","01/04/2016","01/08/2016","T3")
			oItems:AddBar(oItems:AddItem("un-locked item 2"),"Task","01/05/2016","01/09/2016","T4")
			oItems:SetProperty("LockedItemCount",1/*exMiddle*/,3)
			h := oItems:LockedItem(1/*exMiddle*/,0)
			oItems:SetProperty("SelectItem",h,.F.)
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemHeight",h,2)
			h := oItems:LockedItem(1/*exMiddle*/,1)
			oItems:SetProperty("CellValue",h,0,"locked-bottom 1")
			oItems:AddBar(h,"Task","01/04/2016","01/08/2016","T5")
			h := oItems:LockedItem(1/*exMiddle*/,2)
			oItems:SetProperty("CellValue",h,0,"locked-bottom 2")
			oItems:AddBar(h,"Task","01/05/2016","01/09/2016","T6")
		oItems1 := oG2antt:Items()
			h := oItems1:FindBar("T4",0)
			oItems1:SetProperty("ItemBar",h,oItems1:FirstItemBar(h),33/*exBarColor*/,255)
			oItems1:SetProperty("CellValue",h,1,h)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1760
Is it possible to search for a bar through bottom-locked-items only

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems,oItems1
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Debug := .T.
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/31/2015"
		oG2antt:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor  ( { 250,250,250 } )  , .F. ))
		oG2antt:ShowLockedItems := .T.
		oG2antt:Columns():Add("Column")
		oColumn := oG2antt:Columns():Add("Find")
			oColumn:SetProperty("Def",17/*exCellValueFormat*/,1)
			oColumn:Visible := .F.
			oColumn:FormatColumn := "int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` "
		oG2antt:Chart():ColumnsFormatLevel := "1"
		oItems := oG2antt:Items()
			oItems:SetProperty("LockedItemCount",0/*exTop*/,3)
			h := oItems:LockedItem(0/*exTop*/,0)
			oItems:SetProperty("CellValue",h,0,"locked-top 1")
			oItems:AddBar(h,"Task","01/04/2016","01/08/2016","T1")
			h := oItems:LockedItem(0/*exTop*/,1)
			oItems:SetProperty("CellValue",h,0,"locked-top 2")
			oItems:AddBar(h,"Task","01/05/2016","01/09/2016","T2")
			h := oItems:LockedItem(0/*exTop*/,2)
			oItems:SetProperty("SelectItem",h,.F.)
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemHeight",h,2)
			oItems:AddBar(oItems:AddItem("un-locked item 1"),"Task","01/04/2016","01/08/2016","T3")
			oItems:AddBar(oItems:AddItem("un-locked item 2"),"Task","01/05/2016","01/09/2016","T4")
			oItems:SetProperty("LockedItemCount",1/*exMiddle*/,3)
			h := oItems:LockedItem(1/*exMiddle*/,0)
			oItems:SetProperty("SelectItem",h,.F.)
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemHeight",h,2)
			h := oItems:LockedItem(1/*exMiddle*/,1)
			oItems:SetProperty("CellValue",h,0,"locked-bottom 1")
			oItems:AddBar(h,"Task","01/04/2016","01/08/2016","T5")
			h := oItems:LockedItem(1/*exMiddle*/,2)
			oItems:SetProperty("CellValue",h,0,"locked-bottom 2")
			oItems:AddBar(h,"Task","01/05/2016","01/09/2016","T6")
		oItems1 := oG2antt:Items()
			h := oItems1:FindBar("T6",-4)
			oItems1:SetProperty("ItemBar",h,oItems1:FirstItemBar(h),33/*exBarColor*/,255)
			oItems1:SetProperty("CellValue",h,1,h)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1759
Is it possible to search for a bar through top-locked-items only

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems,oItems1
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Debug := .T.
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/31/2015"
		oG2antt:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor  ( { 250,250,250 } )  , .F. ))
		oG2antt:ShowLockedItems := .T.
		oG2antt:Columns():Add("Column")
		oColumn := oG2antt:Columns():Add("Find")
			oColumn:SetProperty("Def",17/*exCellValueFormat*/,1)
			oColumn:Visible := .F.
			oColumn:FormatColumn := "int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` "
		oG2antt:Chart():ColumnsFormatLevel := "1"
		oItems := oG2antt:Items()
			oItems:SetProperty("LockedItemCount",0/*exTop*/,3)
			h := oItems:LockedItem(0/*exTop*/,0)
			oItems:SetProperty("CellValue",h,0,"locked-top 1")
			oItems:AddBar(h,"Task","01/04/2016","01/08/2016","T1")
			h := oItems:LockedItem(0/*exTop*/,1)
			oItems:SetProperty("CellValue",h,0,"locked-top 2")
			oItems:AddBar(h,"Task","01/05/2016","01/09/2016","T2")
			h := oItems:LockedItem(0/*exTop*/,2)
			oItems:SetProperty("SelectItem",h,.F.)
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemHeight",h,2)
			oItems:AddBar(oItems:AddItem("un-locked item 1"),"Task","01/04/2016","01/08/2016","T3")
			oItems:AddBar(oItems:AddItem("un-locked item 2"),"Task","01/05/2016","01/09/2016","T4")
			oItems:SetProperty("LockedItemCount",1/*exMiddle*/,3)
			h := oItems:LockedItem(1/*exMiddle*/,0)
			oItems:SetProperty("SelectItem",h,.F.)
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemHeight",h,2)
			h := oItems:LockedItem(1/*exMiddle*/,1)
			oItems:SetProperty("CellValue",h,0,"locked-bottom 1")
			oItems:AddBar(h,"Task","01/04/2016","01/08/2016","T5")
			h := oItems:LockedItem(1/*exMiddle*/,2)
			oItems:SetProperty("CellValue",h,0,"locked-bottom 2")
			oItems:AddBar(h,"Task","01/05/2016","01/09/2016","T6")
		oItems1 := oG2antt:Items()
			h := oItems1:FindBar("T1",-3)
			oItems1:SetProperty("ItemBar",h,oItems1:FirstItemBar(h),33/*exBarColor*/,255)
			oItems1:SetProperty("CellValue",h,1,h)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1758
Is it possible to search for a bar through all locked-items only

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems,oItems1
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Debug := .T.
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/31/2015"
		oG2antt:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor  ( { 250,250,250 } )  , .F. ))
		oG2antt:ShowLockedItems := .T.
		oG2antt:Columns():Add("Column")
		oColumn := oG2antt:Columns():Add("Find")
			oColumn:SetProperty("Def",17/*exCellValueFormat*/,1)
			oColumn:Visible := .F.
			oColumn:FormatColumn := "int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` "
		oG2antt:Chart():ColumnsFormatLevel := "1"
		oItems := oG2antt:Items()
			oItems:SetProperty("LockedItemCount",0/*exTop*/,3)
			h := oItems:LockedItem(0/*exTop*/,0)
			oItems:SetProperty("CellValue",h,0,"locked-top 1")
			oItems:AddBar(h,"Task","01/04/2016","01/08/2016","T1")
			h := oItems:LockedItem(0/*exTop*/,1)
			oItems:SetProperty("CellValue",h,0,"locked-top 2")
			oItems:AddBar(h,"Task","01/05/2016","01/09/2016","T2")
			h := oItems:LockedItem(0/*exTop*/,2)
			oItems:SetProperty("SelectItem",h,.F.)
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemHeight",h,2)
			oItems:AddBar(oItems:AddItem("un-locked item 1"),"Task","01/04/2016","01/08/2016","T3")
			oItems:AddBar(oItems:AddItem("un-locked item 2"),"Task","01/05/2016","01/09/2016","T4")
			oItems:SetProperty("LockedItemCount",1/*exMiddle*/,3)
			h := oItems:LockedItem(1/*exMiddle*/,0)
			oItems:SetProperty("SelectItem",h,.F.)
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemHeight",h,2)
			h := oItems:LockedItem(1/*exMiddle*/,1)
			oItems:SetProperty("CellValue",h,0,"locked-bottom 1")
			oItems:AddBar(h,"Task","01/04/2016","01/08/2016","T5")
			h := oItems:LockedItem(1/*exMiddle*/,2)
			oItems:SetProperty("CellValue",h,0,"locked-bottom 2")
			oItems:AddBar(h,"Task","01/05/2016","01/09/2016","T6")
		oItems1 := oG2antt:Items()
			h := oItems1:FindBar("T2",-2)
			oItems1:SetProperty("ItemBar",h,oItems1:FirstItemBar(h),33/*exBarColor*/,255)
			oItems1:SetProperty("CellValue",h,1,h)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1757
Is it possible to search for a bar through all items ( including locked items )

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems,oItems1
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Debug := .T.
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/31/2015"
		oG2antt:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor  ( { 250,250,250 } )  , .F. ))
		oG2antt:ShowLockedItems := .T.
		oG2antt:Columns():Add("Column")
		oColumn := oG2antt:Columns():Add("Find")
			oColumn:SetProperty("Def",17/*exCellValueFormat*/,1)
			oColumn:Visible := .F.
			oColumn:FormatColumn := "int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` "
		oG2antt:Chart():ColumnsFormatLevel := "1"
		oItems := oG2antt:Items()
			oItems:SetProperty("LockedItemCount",0/*exTop*/,3)
			h := oItems:LockedItem(0/*exTop*/,0)
			oItems:SetProperty("CellValue",h,0,"locked-top 1")
			oItems:AddBar(h,"Task","01/04/2016","01/08/2016","T1")
			h := oItems:LockedItem(0/*exTop*/,1)
			oItems:SetProperty("CellValue",h,0,"locked-top 2")
			oItems:AddBar(h,"Task","01/05/2016","01/09/2016","T2")
			h := oItems:LockedItem(0/*exTop*/,2)
			oItems:SetProperty("SelectItem",h,.F.)
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemHeight",h,2)
			oItems:AddBar(oItems:AddItem("un-locked item 1"),"Task","01/04/2016","01/08/2016","T3")
			oItems:AddBar(oItems:AddItem("un-locked item 2"),"Task","01/05/2016","01/09/2016","T4")
			oItems:SetProperty("LockedItemCount",1/*exMiddle*/,3)
			h := oItems:LockedItem(1/*exMiddle*/,0)
			oItems:SetProperty("SelectItem",h,.F.)
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemHeight",h,2)
			h := oItems:LockedItem(1/*exMiddle*/,1)
			oItems:SetProperty("CellValue",h,0,"locked-bottom 1")
			oItems:AddBar(h,"Task","01/04/2016","01/08/2016","T5")
			h := oItems:LockedItem(1/*exMiddle*/,2)
			oItems:SetProperty("CellValue",h,0,"locked-bottom 2")
			oItems:AddBar(h,"Task","01/05/2016","01/09/2016","T6")
		oItems1 := oG2antt:Items()
			h := oItems1:FindBar("T5",-1)
			oItems1:SetProperty("ItemBar",h,oItems1:FirstItemBar(h),33/*exBarColor*/,255)
			oItems1:SetProperty("CellValue",h,1,h)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1756
How do I clip/hide/align the bar's caption/text based on the bar's size/width/length

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Clip")
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:DrawGridLines := -2/*exRowLines*/
		oChart := oG2antt:Chart()
			oChart:AllowResizeChart := 6/*exAllowResizeChartMiddle+exAllowResizeChartHeader*/
			oChart:DrawGridLines := -2/*exRowLines*/
			oChart:FirstVisibleDate := "12/23/2000"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,216)
			oBar := oChart:Bars:Item("Task")
				oBar:Pattern := 32/*exPatternBox*/
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 164,164,164 } )  , .F. ))
				oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
				oBar:SetProperty("EndColor",oBar:StartColor())
				oBar:OverlaidType := 4611/*exOverlaidBarsIncludeCaption+exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/
				oBar:Height := 15
			oChart:MinUnitWidth := oChart:UnitWidth()
		oItems := oG2antt:Items()
			h := oItems:AddItem("no clip, (0-2)")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K1","no clip, right(<b>2</b>)")
			oItems:SetProperty("ItemBar",h,"K1",4/*exBarHAlignCaption*/,2)
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K2","no clip, center(<b>1</b>)")
			oItems:SetProperty("ItemBar",h,"K2",4/*exBarHAlignCaption*/,1)
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K3","no clip, left(<b>0</b>)")
			oItems:SetProperty("ItemBar",h,"K3",4/*exBarHAlignCaption*/,0)
			h := oItems:AddItem("clip, inside (3-5)")
			oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K1","clip, inside, right(<b>5</b>)")
			oItems:SetProperty("ItemBar",h,"K1",4/*exBarHAlignCaption*/,5)
			oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K2","clip, inside, center(<b>4</b>)")
			oItems:SetProperty("ItemBar",h,"K2",4/*exBarHAlignCaption*/,4)
			oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K3","clip, inside, left(<b>3</b>)")
			oItems:SetProperty("ItemBar",h,"K3",4/*exBarHAlignCaption*/,3)
			h := oItems:AddItem("hide on min width, clip if not fit, inside (6-8)")
			oItems:AddBar(h,"Task","12/26/2000","01/10/2001","K1","hide on min width, clip if not fit, inside, right(<b>8</b>)")
			oItems:SetProperty("ItemBar",h,"K1",4/*exBarHAlignCaption*/,8)
			oItems:AddBar(h,"Task","12/26/2000","01/10/2001","K2","hide on min width, clip if not fit, inside, center(<b>7</b>)")
			oItems:SetProperty("ItemBar",h,"K2",4/*exBarHAlignCaption*/,7)
			oItems:AddBar(h,"Task","12/26/2000","01/10/2001","K3","hide on min width, clip if not fit, inside, left(<b>6</b>)")
			oItems:SetProperty("ItemBar",h,"K3",4/*exBarHAlignCaption*/,6)
			h := oItems:AddItem("hide if not fit, no clip, inside (9-11)")
			oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K1","hide if not fit, no clip, inside, right(<b>11</b>)")
			oItems:SetProperty("ItemBar",h,"K1",4/*exBarHAlignCaption*/,11)
			oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K2","hide if not fit, no clip, center(<b>10</b>)")
			oItems:SetProperty("ItemBar",h,"K2",4/*exBarHAlignCaption*/,10)
			oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K3","hide if not fit, no clip, inside, left(<b>9</b>)")
			oItems:SetProperty("ItemBar",h,"K3",4/*exBarHAlignCaption*/,9)
			h := oItems:AddItem("no clip, inside, outside (12-14)")
			oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K1","no clip, inside, outside, right(<b>14</b>)")
			oItems:SetProperty("ItemBar",h,"K1",4/*exBarHAlignCaption*/,14)
			oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K2","no clip, inside, outside, center(<b>13</b>)")
			oItems:SetProperty("ItemBar",h,"K2",4/*exBarHAlignCaption*/,13)
			oItems:AddBar(h,"Task","12/28/2000","01/08/2001","K3","no clip, inside, outside, left(<b>12</b>)")
			oItems:SetProperty("ItemBar",h,"K3",4/*exBarHAlignCaption*/,12)
			h := oItems:AddItem("no clip, outside (16-18)")
			oItems:AddBar(h,"Task","12/30/2000","01/06/2001","K1","no clip, outside, right(<b>18</b>)")
			oItems:SetProperty("ItemBar",h,"K1",4/*exBarHAlignCaption*/,18)
			oItems:AddBar(h,"Task","12/30/2000","01/06/2001","K2","no clip, outside, center(<b>17</b>)")
			oItems:SetProperty("ItemBar",h,"K2",4/*exBarHAlignCaption*/,17)
			oItems:AddBar(h,"Task","12/30/2000","01/06/2001","K3","no clip, outside, left(<b>16</b>)")
			oItems:SetProperty("ItemBar",h,"K3",4/*exBarHAlignCaption*/,16)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1755
Is there a way to prevent the automatic horizontal scrolling of the chart when moving or resizing a bar (method 2)
PROCEDURE OnDateChange(oG2antt)
	oG2antt:Chart():FirstVisibleDate := "01/02/2001"
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn,oColumn1
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:DateChange := {|| OnDateChange(oG2antt)} /*Occurs when the first visible date is changed.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oColumn := oG2antt:Columns():Add("Start")
			oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
			oColumn:Visible := .F.
			oColumn:Alignment := 0/*LeftAlignment*/
		oColumn1 := oG2antt:Columns():Add("End")
			oColumn1:SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
			oColumn1:Visible := .F.
			oColumn1:Alignment := 2/*RightAlignment*/
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/02/2001"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:ColumnsFormatLevel := "1[bg=12500670]:52,|,2[bg=12500670]:52"
			oChart:ColumnsTransparent := 50
			oChart:ScrollBar := .F.
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/03/2001","01/07/2001")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/04/2001","01/08/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1754
Is there a way to prevent the automatic horizontal scrolling of the chart when moving or resizing a bar, including limiting the bars
PROCEDURE OnBarResizing(oG2antt,Item,Key)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:SetProperty("ItemBar",Item,Key,22/*exBarMinStart*/,"01/01/2001")
		oItems:SetProperty("ItemBar",Item,Key,25/*exBarMaxEnd*/,"02/01/2001")
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn,oColumn1
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BarResizing := {|Item,Key| OnBarResizing(oG2antt,Item,Key)} /*Occurs when a bar is moving or resizing.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oColumn := oG2antt:Columns():Add("Start")
			oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
			oColumn:Visible := .F.
			oColumn:Alignment := 0/*LeftAlignment*/
		oColumn1 := oG2antt:Columns():Add("End")
			oColumn1:SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
			oColumn1:Visible := .F.
			oColumn1:Alignment := 2/*RightAlignment*/
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/02/2001"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:ColumnsFormatLevel := "1[bg=12500670]:52,|,2[bg=12500670]:52"
			oChart:ColumnsTransparent := 50
			oChart:SetProperty("ScrollRange",0/*exStartDate*/,"01/01/2001")
			oChart:SetProperty("ScrollRange",1/*exEndDate*/,"01/31/2001")
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/03/2001","01/07/2001")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/04/2001","01/08/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1753
Is there a way to prevent the automatic horizontal scrolling of the chart when moving or resizing a bar (method 1)
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn,oColumn1
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oColumn := oG2antt:Columns():Add("Start")
			oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
			oColumn:Visible := .F.
			oColumn:Alignment := 0/*LeftAlignment*/
		oColumn1 := oG2antt:Columns():Add("End")
			oColumn1:SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
			oColumn1:Visible := .F.
			oColumn1:Alignment := 2/*RightAlignment*/
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/02/2001"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:ColumnsFormatLevel := "1[bg=12500670]:52,|,2[bg=12500670]:52"
			oChart:ColumnsTransparent := 50
			oChart:SetProperty("ScrollRange",0/*exStartDate*/,"01/01/2001")
			oChart:SetProperty("ScrollRange",1/*exEndDate*/,"01/31/2001")
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/03/2001","01/07/2001")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/04/2001","01/08/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1752
Is it possible to have "Preview Window" as a "Modal Window or 'always-on-top window'"
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oPrint
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/07/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			oItems:SetProperty("Link","L1",6/*exLinkStartPos*/,0)
		oG2antt:EndUpdate()
		oPrint := CreateObject("Exontrol.Print")
			DevOut( oPrint:Version() )
			oPrint:Foreground := -1
			oPrint:PrintExt := oG2antt
			oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1751
The week number is not correct (wrong). What can I do

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:FirstWeekDay := oChart:LocFirstWeekDay()
			oChart:MonthNames := oChart:LocMonthNames()
			oChart:WeekDays := oChart:LocWeekDays()
			oChart:AMPM := oChart:LocAMPM()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:UnitScale := 256/*exWeek*/
			oChart:UnitWidth := 32
			oChart:FirstVisibleDate := "01/01/2016"
			oChart:AdjustLevelsToBase := .T.
			oChart:WeekNumberAs := 0/*exISO8601WeekNumber*/
			oChart:ShowNonworkingDates := .F.
			oChart:ScrollTo(oChart:FirstVisibleDate(),1)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1750
When the user zooms with the mouse, the chart automatically switches the unit scale - ideally I'd like to replicate this so I can switch the unitscale at the same "zoom levels" that the mouse zooming does - is this possible
PROCEDURE OnChartEndChanging(oG2antt,Operation)
	LOCAL oChart
	oChart := oG2antt:Chart()
		DevOut( "FirstVisibleDate" )
		DevOut( Transform(oChart:FirstVisibleDate(),"") )
		DevOut( "UnitScale" )
		DevOut( Transform(oChart:UnitScale(),"") )
		DevOut( "UnitWidth" )
		DevOut( Transform(oChart:UnitWidth(),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:ChartEndChanging := {|Operation| OnChartEndChanging(oG2antt,Operation)} /*Occurs after the chart has been changed.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 3
			oChart:AllowResizeChart := 262/*exAllowChangeUnitScale+exAllowResizeChartMiddle+exAllowResizeChartHeader*/
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:SetProperty("MarkTodayColor",oChart:BackColor())
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1749
The first week number is not correctly assigned. What can I do

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:FirstVisibleDate := "01/01/2016"
			oChart:LevelCount := 2
			oChart:FirstWeekDay := 1/*exMonday*/
			oChart:UnitScale := 256/*exWeek*/
			oChart:ScrollTo(oChart:FirstVisibleDate(),1)
			oChart:DrawGridLines := -1/*exAllLines*/
			oChart:AdjustLevelsToBase := .T.
			oChart:Level(0):Label := "<c><%mmmm%>"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1748
How can I display the +/- expand - collapse buttons, a bit larger

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(3,"c:\exontrol\images\normal.ebn")
			oAppearance:Add(4,"c:\exontrol\images\pushed.ebn")
			oAppearance:Add(1,"CP:3 -4 -4 4 4")
			oAppearance:Add(2,"CP:4 -4 -4 4 4")
		oG2antt:LinesAtRoot := 1/*exGroupLinesAtRoot*/
		oG2antt:HasButtons := 4/*exCustom*/
		oG2antt:SetProperty("HasButtonsCustom",.F.,16777216)
		oG2antt:SetProperty("HasButtonsCustom",.T.,33554432)
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1747
Is there any option to control where I can drop the items when using the AutoDrag property
PROCEDURE OnAllowAutoDrag(oG2antt,Item,NewParent,InsertA,InsertB,Cancel)
	LOCAL oItems
	oItems := oG2antt:Items()
		DevOut( "NewParent" )
		DevOut( oItems:CellCaption(NewParent,0) )
		DevOut( "After" )
		DevOut( oItems:CellCaption(InsertA,0) )
		DevOut( "Before" )
		DevOut( oItems:CellCaption(InsertB,0) )
	Cancel := .T.
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h,h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AllowAutoDrag := {|Item,NewParent,InsertA,InsertB,Cancel| OnAllowAutoDrag(oG2antt,Item,NewParent,InsertA,InsertB,Cancel)} /*Occurs when the user drags the item between InsertA and InsertB as child of NewParent.*/

		oG2antt:BeginUpdate()
		oG2antt:AutoDrag := 3/*exAutoDragPositionAny*/
		oG2antt:LinesAtRoot := 0/*exNoLinesAtRoot*/
		oG2antt:HasLines := 2/*exThinLine*/
		oG2antt:ShowFocusRect := .F.
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:ShowNonworkingDates := .F.
			oChart:FirstVisibleDate := "12/29/2000"
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h := oItems:AddItem("Group 1")
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemBold",h,.T.)
			h1 := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/07/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			oItems:SetProperty("Link","L1",12/*exLinkText*/,"L1")
			h3 := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(h3,"Task","01/08/2001","01/10/2001","K3")
			oItems:AddLink("L2",h2,"K2",h3,"K3")
			oItems:SetProperty("Link","L2",12/*exLinkText*/,"L2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Group 2")
			oItems:SetProperty("ItemBold",h,.T.)
			oItems:SetProperty("ItemDivider",h,0)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1746
The column (chart section ) overlaps the bars, when using the ColumnsFormatLevel property. How can I prevent that

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn,oColumn1
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oColumn := oG2antt:Columns():Add("Start")
			oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
			oColumn:Visible := .F.
			oColumn:Alignment := 0/*LeftAlignment*/
		oColumn1 := oG2antt:Columns():Add("End")
			oColumn1:SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
			oColumn1:Visible := .F.
			oColumn1:Alignment := 2/*RightAlignment*/
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/02/2001"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:ColumnsFormatLevel := "1[bg=12500670]:52,|,2[bg=12500670]:52"
			oChart:ColumnsTransparent := 50
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/03/2001","01/07/2001")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/04/2001","01/08/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1745
How do I show the column ( chart section ) with a different background color, when using the ColumnsFormatLevel property (method 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn,oColumn1
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oColumn := oG2antt:Columns():Add("Start")
			oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
			oColumn:Visible := .F.
			oColumn:Alignment := 0/*LeftAlignment*/
		oColumn1 := oG2antt:Columns():Add("End")
			oColumn1:SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
			oColumn1:Visible := .F.
			oColumn1:Alignment := 2/*RightAlignment*/
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/02/2001"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:ColumnsFormatLevel := "1[bg=12500670]:52,|,2[bg=12500670]:52"
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/03/2001","01/07/2001")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/04/2001","01/08/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1744
How do I show the column ( chart section ) with a different background color, when using the ColumnsFormatLevel property (method 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn,oColumn1
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oColumn := oG2antt:Columns():Add("Start")
			oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
			oColumn:Visible := .F.
			oColumn:Alignment := 0/*LeftAlignment*/
			oColumn:SetProperty("Def",4/*exCellBackColor*/,12500670)
		oColumn1 := oG2antt:Columns():Add("End")
			oColumn1:SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
			oColumn1:Visible := .F.
			oColumn1:Alignment := 2/*RightAlignment*/
			oColumn1:SetProperty("Def",4/*exCellBackColor*/,12500670)
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/31/2000"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:ColumnsFormatLevel := "1:52,|,2:52"
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/03/2001","01/07/2001")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/04/2001","01/08/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1743
How can I display the control's content on an single A3 paper size, when using PDF format

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL oNote,oNote1
	LOCAL oNotes
	LOCAL h,var_CopyTo

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oG2antt:AntiAliasing := .T.
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/24/2000"
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:LevelCount := 2
			oChart:UnitScale := 4096/*exDay*/
			oBar := oChart:Bars:Item("Task")
				oBar:Pattern := 1/*exPatternSolid*/
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
				oBar:Height := 16
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","12/25/2000","01/05/2001","1","<fgcolor=FFFFFF>Center")
			oItems:SetProperty("ItemBar",h,"1",44/*exBarExtraCaption*/,"left")
			oItems:SetProperty("ItemBar",h,"1",45/*exBarExtraCaptionHAlign*/,16)
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","01/05/2001","01/16/2001","1","<fgcolor=FFFFFF>Center")
			h := oItems:AddItem("Task 3")
			oItems:AddBar(h,"Task","01/16/2001","01/26/2001","2","Center")
			oItems:SetProperty("ItemBar",h,"2",44/*exBarExtraCaption*/,"right")
			oItems:SetProperty("ItemBar",h,"2",45/*exBarExtraCaptionHAlign*/,18)
		oNotes := oG2antt:Chart():Notes()
			oNote := oNotes:Add("1S",oG2antt:Items():ItemByIndex(1),"1","<%m3%>-<%d%>")
				oNote:SetProperty("PartShadow",1/*exNoteEnd*/,.F.)
				oNote:SetProperty("PartHOffset",1/*exNoteEnd*/,-16)
				oNote:SetProperty("PartVOffset",1/*exNoteEnd*/,4)
			oNote1 := oNotes:Add("1F",oG2antt:Items():ItemByIndex(1),"1","<%m3%>-<%d%>")
				oNote1:RelativePosition := 1
				oNote1:SetProperty("PartShadow",1/*exNoteEnd*/,.F.)
				oNote1:SetProperty("PartHOffset",1/*exNoteEnd*/,16)
				oNote1:SetProperty("PartVOffset",1/*exNoteEnd*/,-4)
		var_CopyTo := oG2antt:CopyTo("C:\Temp\Preview.pdf|11.69 in x 16.53 in||single")
		DevOut( "Look for C:\Temp\Preview.pd file." )
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1742
How can I display the control's content on an A3 paper size, when using PDF format

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL oNote,oNote1
	LOCAL oNotes
	LOCAL h,var_CopyTo

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oG2antt:AntiAliasing := .T.
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/24/2000"
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:LevelCount := 2
			oChart:UnitScale := 4096/*exDay*/
			oBar := oChart:Bars:Item("Task")
				oBar:Pattern := 1/*exPatternSolid*/
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
				oBar:Height := 16
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","12/25/2000","01/05/2001","1","<fgcolor=FFFFFF>Center")
			oItems:SetProperty("ItemBar",h,"1",44/*exBarExtraCaption*/,"left")
			oItems:SetProperty("ItemBar",h,"1",45/*exBarExtraCaptionHAlign*/,16)
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","01/05/2001","01/16/2001","1","<fgcolor=FFFFFF>Center")
			h := oItems:AddItem("Task 3")
			oItems:AddBar(h,"Task","01/16/2001","01/26/2001","2","Center")
			oItems:SetProperty("ItemBar",h,"2",44/*exBarExtraCaption*/,"right")
			oItems:SetProperty("ItemBar",h,"2",45/*exBarExtraCaptionHAlign*/,18)
		oNotes := oG2antt:Chart():Notes()
			oNote := oNotes:Add("1S",oG2antt:Items():ItemByIndex(1),"1","<%m3%>-<%d%>")
				oNote:SetProperty("PartShadow",1/*exNoteEnd*/,.F.)
				oNote:SetProperty("PartHOffset",1/*exNoteEnd*/,-16)
				oNote:SetProperty("PartVOffset",1/*exNoteEnd*/,4)
			oNote1 := oNotes:Add("1F",oG2antt:Items():ItemByIndex(1),"1","<%m3%>-<%d%>")
				oNote1:RelativePosition := 1
				oNote1:SetProperty("PartShadow",1/*exNoteEnd*/,.F.)
				oNote1:SetProperty("PartHOffset",1/*exNoteEnd*/,16)
				oNote1:SetProperty("PartVOffset",1/*exNoteEnd*/,-4)
		var_CopyTo := oG2antt:CopyTo("C:\Temp\Preview.pdf|11.69 in x 16.53 in")
		DevOut( "Look for C:\Temp\Preview.pd file." )
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1741
How can I specify the grouping strategy, ie numbers from 1 to 5 are given the value (1-5) and grouping is done on this new value

PROCEDURE OnAddGroupItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:SetProperty("ItemBold",Item,.T.)
		oItems:AddBar(Item,"Summary",oItems:CellValue(Item,1),oItems:CellValue(Item,2))
		oItems:DefineSummaryBars(Item,"",-3,"")
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn,oColumn1,oColumn2
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddGroupItem := {|Item| OnAddGroupItem(oG2antt,Item)} /*Occurs after a new Group Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oG2antt:AllowGroupBy := .T.
		oG2antt:SortBarVisible := .T.
		oG2antt:MarkSearchColumn := .F.
		oColumns := oG2antt:Columns()
			oColumns:Add("Tasks")
			oColumn := oColumns:Add("Start")
				oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
				oColumn:AllowGroupBy := .F.
			oColumn1 := oColumns:Add("End")
				oColumn1:SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
				oColumn1:AllowGroupBy := .F.
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,256)
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("1"),"Task","09/21/2006","09/27/2006")
			oItems:AddBar(oItems:AddItem("1"),"Task","09/22/2006","09/28/2006")
			oItems:AddBar(oItems:AddItem("2"),"Task","09/22/2006","09/28/2006")
			oItems:AddBar(oItems:AddItem("2"),"Task","09/23/2006","09/29/2006")
			oItems:AddBar(oItems:AddItem("3"),"Task","09/25/2006","09/29/2006")
			oItems:AddBar(oItems:AddItem("3"),"Task","09/26/2006","09/30/2006")
		oColumn2 := oG2antt:Columns():Add("Tasks - Group")
			oColumn2:Visible := .F.
			oColumn2:FormatColumn := "%0 in (1,2) ? `1 - 2` : `3 -`"
			oColumn2:SortOrder := 1/*SortAscending*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1740
How can I filter the chart and its content, not the items section

PROCEDURE OnRClick(oG2antt)
	oG2antt:Columns:Item("Start"):ShowFilter("-1,-1,128,128")
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:RClick := {|| OnRClick(oG2antt)} /*Fired when right mouse button is clicked*/

		oG2antt:BeginUpdate()
		oG2antt:SortBarVisible := .T.
		oG2antt:MarkSearchColumn := .F.
		oColumns := oG2antt:Columns()
			oColumns:Add("Tasks")
			oColumn := oColumns:Add("Start")
				oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
				oColumn:DisplayFilterDate := .T.
				oColumn:DisplayFilterPattern := .F.
				oColumn:FilterList := 8448/*exShowExclude+exShowCheckBox*/
				oColumn:Visible := .F.
			oColumn1 := oColumns:Add("End")
				oColumn1:SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
				oColumn1:DisplayFilterDate := .T.
				oColumn1:DisplayFilterPattern := .F.
				oColumn1:Visible := .F.
				oColumn1:FilterList := 8448/*exShowExclude+exShowCheckBox*/
				oColumn1:Visible := .F.
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","09/21/2006","09/27/2006")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","09/22/2006","09/28/2006")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","09/22/2006","09/28/2006")
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","09/23/2006","09/29/2006")
			oItems:AddBar(oItems:AddItem("Task 5"),"Task","09/25/2006","09/29/2006")
			oItems:AddBar(oItems:AddItem("Task 6"),"Task","09/26/2006","09/30/2006")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1739
How do I enable the Group-By feature

PROCEDURE OnAddGroupItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:SetProperty("ItemBackColor",Item,AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:Chart():SetProperty("ItemBackColor",Item,AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oItems:SetProperty("ItemDividerLine",Item,0/*EmptyLine*/)
		oItems:AddBar(Item,"Summary",oItems:CellValue(Item,1),oItems:CellValue(Item,2))
		oItems:DefineSummaryBars(Item,"",-3,"")
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddGroupItem := {|Item| OnAddGroupItem(oG2antt,Item)} /*Occurs after a new Group Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oG2antt:AllowGroupBy := .T.
		oG2antt:SortBarVisible := .T.
		oG2antt:MarkSearchColumn := .F.
		oColumns := oG2antt:Columns()
			oColumns:Add("Tasks")
			oColumn := oColumns:Add("Start")
				oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
				oColumn:AllowGroupBy := .F.
			oColumn1 := oColumns:Add("End")
				oColumn1:SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
				oColumn1:AllowGroupBy := .F.
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,256)
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","09/21/2006","09/27/2006")
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","09/22/2006","09/28/2006")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","09/22/2006","09/28/2006")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","09/23/2006","09/29/2006")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","09/25/2006","09/29/2006")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","09/26/2006","09/30/2006")
		oG2antt:Columns:Item(0):SortOrder := 1/*SortAscending*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1738
Is there any method to know number/length/count/duration of working days in a bar ( excluding non-working days)

PROCEDURE OnSelectionChanged(oG2antt)
	LOCAL oItems
	oItems := oG2antt:Items()
		DevOut( oItems:CellCaption(oItems:FocusItem(),0) )
		DevOut( Transform(oItems:ItemBar(oItems:FocusItem(),"",258/*exBarWorkingCount*/),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:SelectionChanged := {|| OnSelectionChanged(oG2antt)} /*Fired after a new item has been selected.*/

		oG2antt:BeginUpdate()
		oG2antt:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 142,190,255 } )  , .F. ))
		oG2antt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:FirstVisibleDate := "01/01/2002"
			oBar := oChart:Bars():Add("Task:Split")
				oBar:Shortcut := "Task"
				oBar:SetProperty("Def",3/*exBarCaption*/,"<%=%258%><font ;6><off 3>w/units")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
		oG2antt:Columns():Add("Task")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task A")
			oItems:AddBar(h,"Task","01/02/2002","01/09/2002")
			h := oItems:AddItem("Task B")
			oItems:AddBar(h,"Task","01/03/2002","01/08/2002")
			oItems:SetProperty("SelectItem",h,.T.)
			h := oItems:AddItem("Task C")
			oItems:AddBar(h,"Task","01/04/2002","01/05/2002")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1737
How do i verify weather specified unit is Nonworking Working Unit

PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	LOCAL d,h
	h := oG2antt:ItemFromPoint(-1,-1,c,hit)
	d := oG2antt:Chart:DateFromPoint(-1,-1)
	DevOut( Transform(d,"") )
	DevOut( Transform(oG2antt:Chart:IsNonworkingDate(d,h),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("NonWorking")
		oChart := oG2antt:Chart()
			oChart:FirstWeekDay := 1/*exMonday*/
			oChart:FirstVisibleDate := "01/24/2008"
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h := oItems:AddItem("Default")
			h := oItems:AddItem("January")
			oItems:SetProperty("ItemNonworkingUnits",h,.F.,"month(value) = 1")
			h := oItems:AddItem("February, Saturday, Sunday")
			oItems:SetProperty("ItemNonworkingUnits",h,.F.,"month(value) = 2 or (weekday(value) = 0 or weekday(value) = 6)")
			h := oItems:AddItem("Sunday")
			oItems:SetProperty("ItemNonworkingUnits",h,.F.,"weekday(value) = 0")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1736
How can I specify the bar's caption to be caption from a column/cell

PROCEDURE OnChange(oG2antt,Item,ColIndex,NewValue)
	oG2antt:Refresh()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oEditor
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Change := {|Item,ColIndex,NewValue| OnChange(oG2antt,Item,ColIndex,NewValue)} /*Occurs when the user changes the cell's content.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,64)
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("Def",3/*exBarCaption*/,"<fgcolor=808080><%=%C0%>")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
		oEditor := oG2antt:Columns():Add("Task"):Editor()
			oEditor:EditType := 3/*DropDownListType*/
			oEditor:AddItem(1,"Aka")
			oEditor:AddItem(2,"Baka")
			oEditor:AddItem(3,"Taka")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem(1),"Task","01/02/2001","01/05/2001")
			oItems:AddBar(oItems:AddItem(2),"Task","01/03/2001","01/06/2001")
			oItems:AddBar(oItems:AddItem(3),"Task","01/04/2001","01/07/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1735
The histogram values displayed on the chart are using 2 decimal places. Can this be formated to just 0 decimal place, so 86.79% becomes 87%

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems
	LOCAL h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oColumn := oG2antt:Columns():Add("Effort")
			oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,21)
			oColumn:Editor():EditType := 4/*SpinType*/
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:NonworkingDays := 0
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:FirstVisibleDate := "06/20/2005"
			oChart:HistogramVisible := .T.
			oChart:HistogramHeight := 128
			oChart:HistogramView := 112/*exHistogramAllItems*/
			oBar := oChart:Bars:Item("Task")
				oBar:HistogramPattern := oBar:Pattern()
				oBar:HistogramType := 0/*exHistOverload*/
				oBar:HistogramCriticalValue := 3
				oBar:ShowHistogramValues := "value>3?255:1"
				oBar:HistogramItems := -11
				oBar:SetProperty("HistogramGridLinesColor",AutomationTranslateColor( GraMakeRGBColor  ( { 192,192,192 } )  , .F. ))
				oBar:SetProperty("HistogramRulerLinesColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,1 } )  , .F. ))
				oBar:FormatHistogramValues := "(value format `0`) + ` units`"
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","06/21/2005","06/23/2005")
			oItems:SetProperty("CellValue",h1,1,6.79)
			h1 := oItems:AddItem("Task 2")
			oItems:AddBar(h1,"Task","06/24/2005","06/26/2005")
			oItems:SetProperty("CellValue",h1,1,3.19)
			h1 := oItems:AddItem("Task 3")
			oItems:AddBar(h1,"Task","06/27/2005","06/29/2005")
			oItems:SetProperty("CellValue",h1,1,2)
			h1 := oItems:AddItem("Task 4")
			oItems:AddBar(h1,"Task","06/30/2005","07/02/2005")
			oItems:SetProperty("CellValue",h1,1,1)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1734
How can I create a relative time-scale

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL oLevel,oLevel1
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 24
		oG2antt:HeaderHeight := oG2antt:DefaultItemHeight()
		oG2antt:GridLineStyle := 48/*exGridLinesSolid*/
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oG2antt:LinesAtRoot := 0/*exNoLinesAtRoot*/
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oChart := oG2antt:Chart()
			oChart:DrawGridLines := -1/*exAllLines*/
			oChart:GridLineStyle := 48/*exGridLinesSolid*/
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := 0
			oChart:NonworkingDays := 0
			oChart:UnitWidth := 36
			oLevel := oChart:Level(0)
				oLevel:Unit := 4096/*exDay*/
				oLevel:Count := 6
				oLevel:Alignment := 1/*CenterAlignment*/
				oLevel:Label := "<%i%>"
				oLevel:FormatLabel := "'<b>' + ( (value / 6)  array ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec') ) + '-16'"
			oLevel1 := oChart:Level(1)
				oLevel1:Label := "<%i%>"
				oLevel1:FormatLabel := "1 + value mod 6 + ` `"
				oLevel1:Alignment := 2/*RightAlignment*/
			oChart:AdjustLevelsToBase := .T.
			oChart:SetProperty("ScrollRange",0/*exStartDate*/,0)
			oChart:SetProperty("ScrollRange",1/*exEndDate*/,95)
			oBar := oChart:Bars:Item("Task")
				oBar:Height := 15
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 252,213,180 } )  , .F. ))
				oBar:Pattern := 1/*exPatternSolid*/
				oBar:SetProperty("Def",3/*exBarCaption*/,"date blocking")
		oG2antt:Columns():Add("Company")
		oItems := oG2antt:Items()
			h := oItems:AddItem("ABC Company")
			oItems:SetProperty("ItemBackColor",h,AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
			oG2antt:Chart():SetProperty("ItemBackColor",h,AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
			hChild := oItems:InsertItem(h,,"line 1")
			oItems:AddBar(hChild,"Task",0,3)
			hChild := oItems:InsertItem(h,,"line 2")
			oItems:AddBar(hChild,"Task",3,5,"A")
			oItems:AddBar(hChild,"Task",7,10,"B")
			hChild := oItems:InsertItem(h,,"line 3")
			oItems:AddBar(hChild,"Task",5,8,"A")
			oItems:AddBar(hChild,"Task",9,12,"B")
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1733
Extending the bar's visual appearance with additional objects, EBNs, using the exBarBackgroundExt and exBarBackgroundExtInflate

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 32
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYEDGHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XzAcj3dbmAYJQzBJLxKSIDwCd6NXrCOJ5HhWDzjQjJMozLC8YiPG6fZRbeT4ToGNdXYhJWiyLiFeYtVzSMj1fD9Ir/EakbLtey4Lq2A53RzdHThSQpCwPA4BgIA=")
			oAppearance:Add(2,"gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYEDGHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NrXHZ9YwTOC5IDke67cr2J53XZAd4QTb2Cz7QC8QAvDA7awafM1MSuHIcOw/AqTYDkTq4XjODYhTDEc4zPLcFx/I6haBoWCSLi+T5VVrRMo1TKtRxnNaubZqO5aRrGe5NW6EXThSQpCr+f4BgIA=")
			oAppearance:Add(3,"gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYEDGHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XxfV6YBa8B4JPaEZLwLB7dwaf6IQLiWLYHiAAYZRKTcxlDI8AwvFaaZjnWA5ZaOMZBU7RNRyHR9IyTDaWaTqeqbHIuJ4FUzaNY2fZrOz2F6FAA6cKSFIWFYVAMBA")
			oAppearance:Add(4,"gBFLBCJwBAEHhEJAADhABb8IQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYEDGHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XxfV6YBa8B4JPaEZLwLB7dwaf6IQLiWLYHiAAYBIbJI5yeb5Hx3HqfZjbeSxVoML43SzHcByGRcTwzC6pYjrGoZJpWZ4ZQrbNR3DZ8VzzNTrQxIUhYVhUAkB")
			oAppearance:RenderType := -16777216
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,164)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("NonworkingDaysColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
			oChart:NonworkingDaysPattern := 6/*exPatternBDiagonal*/
			oBar := oChart:Bars:Item("Task")
				oBar:Height := 17
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
				oBar:Pattern := 1/*exPatternSolid*/
				oBar:SetProperty("Def",51/*exBarFrameColor*/,1)
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task"),"Task","01/02/2001","01/06/2001","")
			h := oItems:AddItem("Task+Rhombus(red)")
			oItems:AddBar(h,"Task","01/02/2001","01/07/2001","")
			oItems:SetProperty("ItemBar",h,"",53/*exBarBackgroundExt*/,"none[(100%-11,50%-6,11,11),back=0x10000FF]")
			oItems:SetProperty("ItemBar",h,"",55/*exBarBackgroundExtInflate*/,",,5")
			h := oItems:AddItem("Rhombus(red)+Task")
			oItems:AddBar(h,"Task","01/02/2001","01/08/2001","")
			oItems:SetProperty("ItemBar",h,"",53/*exBarBackgroundExt*/,"none[(0,50%-6,11,11),back=0x10000FF]")
			oItems:SetProperty("ItemBar",h,"",55/*exBarBackgroundExtInflate*/,"-5")
			h := oItems:AddItem("Task(yellow)+Rhombus(blue)")
			oItems:AddBar(h,"Task","01/02/2001","01/09/2001","")
			oItems:SetProperty("ItemBar",h,"",53/*exBarBackgroundExt*/,"none[(100%-11,50%-6,11,11),back=0x1FF0000]")
			oItems:SetProperty("ItemBar",h,"",55/*exBarBackgroundExtInflate*/,",,5")
			oItems:SetProperty("ItemBar",h,"",33/*exBarColor*/,65535)
			h := oItems:AddItem("Rhombus(blue)+Task(yellow)")
			oItems:AddBar(h,"Task","01/02/2001","01/08/2001","")
			oItems:SetProperty("ItemBar",h,"",53/*exBarBackgroundExt*/,"none[(0,50%-6,11,11),back=0x1FF0000]")
			oItems:SetProperty("ItemBar",h,"",55/*exBarBackgroundExtInflate*/,"-5")
			oItems:SetProperty("ItemBar",h,"",33/*exBarColor*/,65535)
			h := oItems:AddItem("TriangleUp(white)+Task")
			oItems:AddBar(h,"Task","01/02/2001","01/07/2001","")
			oItems:SetProperty("ItemBar",h,"",53/*exBarBackgroundExt*/,"none[(0,50%-6,11,11),back=0x2FFFFFF]")
			oItems:SetProperty("ItemBar",h,"",55/*exBarBackgroundExtInflate*/,"-5")
			h := oItems:AddItem("TriangleUp(blue)+Task(magenta)+TriangleDown(red)")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","")
			oItems:SetProperty("ItemBar",h,"",53/*exBarBackgroundExt*/,"none[(0,50%-6,11,11),back=0x02FF0000],none[(100%-11,50%-6,11,11),back=0x030000FF]")
			oItems:SetProperty("ItemBar",h,"",55/*exBarBackgroundExtInflate*/,"-5,0,5,0")
			oItems:SetProperty("ItemBar",h,"",33/*exBarColor*/,16744703)
			h := oItems:AddItem("Rhombus+Task+TriangleDown")
			oItems:AddBar(h,"Task","01/02/2001","01/07/2001","")
			oItems:SetProperty("ItemBar",h,"",53/*exBarBackgroundExt*/,"none[(0,50%-6,11,11),back=0x01FF0000],none[(100%-11,50%-6,11,11),back=0x030000FF]")
			oItems:SetProperty("ItemBar",h,"",55/*exBarBackgroundExtInflate*/,"-5, 0,5,0")
			oItems:SetProperty("ItemBar",h,"",33/*exBarColor*/,16744448)
			h := oItems:AddItem("Rhombus+Task+TriangleDown")
			oItems:AddBar(h,"Task","01/02/2001","01/08/2001","")
			oItems:SetProperty("ItemBar",h,"",53/*exBarBackgroundExt*/,"none[(50%-6,0,11,11),back=0x01FF0000],none[(50%-6,100%-11,11,11),back=0x010000FF]")
			oItems:SetProperty("ItemBar",h,"",55/*exBarBackgroundExtInflate*/,"0,-5,0,5")
			h := oItems:AddItem("Task+Star")
			oItems:AddBar(h,"Task","01/02/2001","01/09/2001","")
			oItems:SetProperty("ItemBar",h,"",53/*exBarBackgroundExt*/,"none[(100%-11,0,11,11),back=0x4FFFFFF]")
			oItems:SetProperty("ItemBar",h,"",55/*exBarBackgroundExtInflate*/,5)
			h := oItems:AddItem("Star+Task")
			oItems:AddBar(h,"Task","01/02/2001","01/08/2001","")
			oItems:SetProperty("ItemBar",h,"",53/*exBarBackgroundExt*/,"none[(0,100%-11,11,11),back=0x04FFFFFF]")
			oItems:SetProperty("ItemBar",h,"",55/*exBarBackgroundExtInflate*/,5)
			h := oItems:AddItem("Task+Star")
			oItems:AddBar(h,"Task","01/02/2001","01/07/2001","")
			oItems:SetProperty("ItemBar",h,"",53/*exBarBackgroundExt*/,"none[(100%-11,0,11,11),back=0x4FFFFFF]")
			oItems:SetProperty("ItemBar",h,"",55/*exBarBackgroundExtInflate*/,"0,-6,14")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1732
I am using the ItemBar(exBarFrameColor) to display an additional EBN on the current bar. The problem is that I still need a black frame around the bar. How can I achieve that

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAADhABXMIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EQLhGBRQCULQxDCBMIjLJoWhsASVRhnCBBRhwAI7ShPUBgXBNCQzICTJJkSJZBiECIJFAaJhnIapZDKGKQWCjAgiNpqGQ2QiKFC2HAcEAxCxGJBoKKZGq2bpJQLbdxUXRVZzpNi7Louay5CrOCZvXxaeAXDa+Az5ODDMRwLBcKhzCKDYzfdrZFaWFT3Qi8aCvG6sbw/HZ0OrEEIwCEBA")
			oAppearance:Add(2,"CP:1 0 0 5 0")
			oAppearance:Add(3,"gBFLBCJwBAEHhEJAADhABUEIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLIxhEYobgmGIaRiBMIxAKIZhzEgYRoiAYhXDiHwxARHUgRfIEOwHDiBZomWKZEiaKIqRrLMryFLMZx3CqcAApGaqHiOCYlSbTcoyfJYZBzD6mKJpWipWheW48U7PVRDJSkNysASZIyrGKqJouX4WR7BcZgNR4YBgEoWRouSBLWrgNIVR6/eBABZFPzbNK3ZzdOIIJgEgIA=")
			oAppearance:RenderType := -16777216
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,164)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:Bars:Item("Task"):SetProperty("Color",0x3ff0000)
			oChart:Bars():CallMethod("Copy","Task","NewTask"):Height := 15
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001")
			oItems:AddBar(h,"NewTask","01/08/2001","01/12/2001","new")
			h := oItems:AddItem("Task+Rhombus")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001")
			oItems:SetProperty("ItemBar",h,"",51/*exBarFrameColor*/,33554432)
			oItems:AddBar(h,"NewTask","01/08/2001","01/12/2001","new")
			oItems:SetProperty("ItemBar",h,"new",51/*exBarFrameColor*/,33554432)
			h := oItems:AddItem("Task/Color+Rhombus")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001")
			oItems:SetProperty("ItemBar",h,"",51/*exBarFrameColor*/,33554687)
			oItems:SetProperty("ItemBar",h,"",33/*exBarColor*/,65280)
			oItems:AddBar(h,"NewTask","01/08/2001","01/12/2001","new")
			oItems:SetProperty("ItemBar",h,"new",51/*exBarFrameColor*/,33554687)
			oItems:SetProperty("ItemBar",h,"new",33/*exBarColor*/,65280)
			h := oItems:AddItem("Task/Color+Rhombus/Color")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001")
			oItems:SetProperty("ItemBar",h,"",51/*exBarFrameColor*/,33619712)
			oItems:SetProperty("ItemBar",h,"",33/*exBarColor*/,16711935)
			oItems:AddBar(h,"NewTask","01/08/2001","01/12/2001","new")
			oItems:SetProperty("ItemBar",h,"new",51/*exBarFrameColor*/,33619712)
			oItems:SetProperty("ItemBar",h,"new",33/*exBarColor*/,16711935)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1731
I am using EBN objects to show my bars, but when apply a color to the EBN looks darker. Is it possible to get the same color brightness

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAADhABWkIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EZBGABYJDUMAlCyNQBQSKIYxnAgYY4ACZ5IjqAwLQjQEYzZI0SxJCqQZBBCCSQKkYx0HScRijDILBQwIQmaqjEZoJCiQZfQLCAYRMhkQx9DKTLRtKhYDqubpHUZbdwWRaVYTlM6RLbhGy7YqefJtXLfN4WZgWCz9QLDI4wS78JruaqOW5hVz4BasfTrOzLcTzG4HLhCCYBgI")
			oAppearance:Add(2,"CP:1 -6 0 0 0")
			oAppearance:RenderType := -16777216
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,164)
			oChart:FirstVisibleDate := "01/01/2001"
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001")
			h := oItems:AddItem("Task+Rhombus")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001")
			oItems:SetProperty("ItemBar",h,"",51/*exBarFrameColor*/,33554432)
			h := oItems:AddItem("Task/Color+Rhombus")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001")
			oItems:SetProperty("ItemBar",h,"",51/*exBarFrameColor*/,33554687)
			oItems:SetProperty("ItemBar",h,"",33/*exBarColor*/,65280)
			h := oItems:AddItem("Task/Color+Rhombus/Color")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001")
			oItems:SetProperty("ItemBar",h,"",51/*exBarFrameColor*/,33619712)
			oItems:SetProperty("ItemBar",h,"",33/*exBarColor*/,16711935)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1730
The ItemBar(exBarColor) changes the color for margins, and there is no exBarStartColor/exBarEndColor. However in my case I would then like do dynamically change the bar color to a different color without changing the start shape color

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAADhABWkIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EZBGABYJDUMAlCyNQBQSKIYxnAgYY4ACZ5IjqAwLQjQEYzZI0SxJCqQZBBCCSQKkYx0HScRijDILBQwIQmaqjEZoJCiQZfQLCAYRMhkQx9DKTLRtKhYDqubpHUZbdwWRaVYTlM6RLbhGy7YqefJtXLfN4WZgWCz9QLDI4wS78JruaqOW5hVz4BasfTrOzLcTzG4HLhCCYBgI")
			oAppearance:Add(2,"CP:1 -6 0 0 0")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,164)
			oChart:FirstVisibleDate := "01/01/2001"
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001")
			h := oItems:AddItem("Task+Rhombus")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001")
			oItems:SetProperty("ItemBar",h,"",51/*exBarFrameColor*/,33554432)
			h := oItems:AddItem("Task/Color+Rhombus")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001")
			oItems:SetProperty("ItemBar",h,"",51/*exBarFrameColor*/,33554432)
			oItems:SetProperty("ItemBar",h,"",33/*exBarColor*/,65280)
			h := oItems:AddItem("Task/Color+Rhombus/Color")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001")
			oItems:SetProperty("ItemBar",h,"",51/*exBarFrameColor*/,33619712)
			oItems:SetProperty("ItemBar",h,"",33/*exBarColor*/,16711935)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1729
The ItemBar(exBarColor) changes the color for margins, and there is no exBarStartColor/exBarEndColor. However in my case I would then like do dynamically change the bar color to a different color without changing the end shape color

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAADhABXMIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EQLhGBRQCULQxDCBMIjLJoWhsASVRhnCBBRhwAI7ShPUBgXBNCQzICTJJkSJZBiECIJFAaJhnIapZDKGKQWCjAgiNpqGQ2QiKFC2HAcEAxCxGJBoKKZGq2bpJQLbdxUXRVZzpNi7Louay5CrOCZvXxaeAXDa+Az5ODDMRwLBcKhzCKDYzfdrZFaWFT3Qi8aCvG6sbw/HZ0OrEEIwCEBA")
			oAppearance:Add(2,"CP:1 0 0 6 0")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,164)
			oChart:FirstVisibleDate := "01/01/2001"
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001")
			h := oItems:AddItem("Task+Rhombus")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001")
			oItems:SetProperty("ItemBar",h,"",51/*exBarFrameColor*/,33554432)
			h := oItems:AddItem("Task/Color+Rhombus")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001")
			oItems:SetProperty("ItemBar",h,"",51/*exBarFrameColor*/,33554432)
			oItems:SetProperty("ItemBar",h,"",33/*exBarColor*/,65280)
			h := oItems:AddItem("Task/Color+Rhombus/Color")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001")
			oItems:SetProperty("ItemBar",h,"",51/*exBarFrameColor*/,33619712)
			oItems:SetProperty("ItemBar",h,"",33/*exBarColor*/,16711935)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1728
Is it possible to resize a column with the mouse without changing the width of the next column

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ColumnAutoResize := .F.
		oG2antt:Columns():Add("Column 1"):Width := 256
		oG2antt:Columns():Add("Column 2"):Width := 512
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1727
How can I align captions of items with checkbox, with items with no checkbox

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Default")
		oItems := oG2antt:Items()
			oItems:SetProperty("CellImages",oItems:AddItem(0),0,"1")
			oItems:SetProperty("CellHasCheckBox",oItems:AddItem(1),0,.T.)
			oItems:SetProperty("CellImages",oItems:AddItem(2),0,"1")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1726
How can I show each group header ( not-subroup ), with a different background color, while alternate background colors for inside items

PROCEDURE OnAddGroupItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Summary",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
		oItems:DefineSummaryBars(Item,"",-3,"")
RETURN

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Task",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
RETURN

PROCEDURE OnLayoutChanged(oG2antt)
	oG2antt:Refresh()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddGroupItem := {|Item| OnAddGroupItem(oG2antt,Item)} /*Occurs after a new Group Item has been inserted to Items collection.*/
		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/
		oG2antt:LayoutChanged := {|| OnLayoutChanged(oG2antt)} /*Occurs when column's position or column's size is changed.*/

		oG2antt:BeginUpdate()
		oG2antt:Chart():FirstVisibleDate := "09/01/1994"
		oG2antt:Chart():SetProperty("PaneWidth",.F.,312)
		oG2antt:SetProperty("BackColorSortBar",oG2antt:BackColor())
		oG2antt:ColumnAutoResize := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:Items():AllowCellValueToItemBar := .T.
		oG2antt:Columns:Item(2):SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
		oG2antt:Columns:Item(4):SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
		oG2antt:SortBarVisible := .T.
		oG2antt:SortBarCaption := "Drag a <b>column</b> header here to group by that column."
		oG2antt:AllowGroupBy := .T.
		oG2antt:Columns:Item(1):SortOrder := 1/*SortAscending*/
		oColumn := oG2antt:Columns():Add("Position")
			oColumn:FormatColumn := "(0:= (1 rpos '')) right ( ( 1:= ( =:0 rfind `.` ) ) != -1 ? =:1 : len(=:0))"
			oColumn:Visible := .F.
		oColumn1 := oG2antt:Columns():Add("Position")
			oColumn1:FormatColumn := "(1 rpos '') contains '.'"
			oColumn1:Visible := .F.
		oG2antt:ConditionalFormats():Add("(%C13 mod 2) != 0"):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:ConditionalFormats():Add("%C14 = 0"):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 190,190,190 } )  , .F. ))
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1725
What is the difference between %0 and %C0, when using in expressions ( format, conditional format, computed fields, and so on )

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1
	LOCAL oEditor
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:HeaderAppearance := 4/*Etched*/
		oG2antt:HeaderHeight := 24
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:DrawGridLines := -2/*exRowLines*/
		oG2antt:Columns():Add("Value"):SetProperty("Def",17/*exCellValueFormat*/,1)
		oColumn := oG2antt:Columns():Add("FormatColumn = `%0` ~ CellValue")
			oColumn:FormatColumn := "%0"
			oColumn:SetProperty("Def",16/*exCellSingleLine*/,.F.)
		oColumn1 := oG2antt:Columns():Add("FormatColumn = `%C0`~ CellCaption")
			oColumn1:FormatColumn := "%C0"
			oColumn1:SetProperty("Def",16/*exCellSingleLine*/,.F.)
		oItems := oG2antt:Items()
			oItems:AddItem(1.1234)
			oItems:SetProperty("CellValueFormat",oItems:AddItem("<sha ;;0>This <fgcolor=FF0000>is a <s><b>HTM</fgcolor>L</b> text</s>."),0,1/*exHTML*/)
			oEditor := oItems:CellEditor(oItems:AddItem(3))
				oEditor:EditType := 6/*CheckListType*/
				oEditor:AddItem(1,"Border")
				oEditor:AddItem(2,"Thick")
				oEditor:AddItem(4,"Shadow")
			oItems:SetProperty("FormatCell",oItems:AddItem(10000),0,"`<b>` + currency(value)")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1724
How can I alternate colors for each group header ( not-subroup ), with a different background color, while items of the same group showing with a different color

PROCEDURE OnAddGroupItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Summary",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
		oItems:DefineSummaryBars(Item,"",-3,"")
RETURN

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Task",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
RETURN

PROCEDURE OnLayoutChanged(oG2antt)
	oG2antt:Refresh()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddGroupItem := {|Item| OnAddGroupItem(oG2antt,Item)} /*Occurs after a new Group Item has been inserted to Items collection.*/
		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/
		oG2antt:LayoutChanged := {|| OnLayoutChanged(oG2antt)} /*Occurs when column's position or column's size is changed.*/

		oG2antt:BeginUpdate()
		oG2antt:Chart():FirstVisibleDate := "09/01/1994"
		oG2antt:Chart():SetProperty("PaneWidth",.F.,312)
		oG2antt:SetProperty("BackColorSortBar",oG2antt:BackColor())
		oG2antt:ColumnAutoResize := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:Items():AllowCellValueToItemBar := .T.
		oG2antt:Columns:Item(2):SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
		oG2antt:Columns:Item(4):SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
		oG2antt:SortBarVisible := .T.
		oG2antt:SortBarCaption := "Drag a <b>column</b> header here to group by that column."
		oG2antt:AllowGroupBy := .T.
		oG2antt:Columns:Item(1):SortOrder := 1/*SortAscending*/
		oColumn := oG2antt:Columns():Add("Position")
			oColumn:FormatColumn := "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"
			oColumn:Visible := .F.
		oColumn1 := oG2antt:Columns():Add("Position")
			oColumn1:FormatColumn := "(1 rpos '') contains '.'"
			oColumn1:Visible := .F.
		oG2antt:ConditionalFormats():Add("(%C13 mod 2) != 0"):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:ConditionalFormats():Add("%C14 = 0"):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 190,190,190 } )  , .F. ))
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1723
How can I highlight each group header, with a different background color (method 2)

PROCEDURE OnAddGroupItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:SetProperty("ItemBackColor",Item,AutomationTranslateColor( GraMakeRGBColor  ( { 190,190,190 } )  , .F. ))
		oItems:AddBar(Item,"Summary",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
		oItems:DefineSummaryBars(Item,"",-3,"")
RETURN

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Task",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
RETURN

PROCEDURE OnLayoutChanged(oG2antt)
	oG2antt:Refresh()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddGroupItem := {|Item| OnAddGroupItem(oG2antt,Item)} /*Occurs after a new Group Item has been inserted to Items collection.*/
		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/
		oG2antt:LayoutChanged := {|| OnLayoutChanged(oG2antt)} /*Occurs when column's position or column's size is changed.*/

		oG2antt:BeginUpdate()
		oG2antt:Chart():FirstVisibleDate := "09/01/1994"
		oG2antt:Chart():SetProperty("PaneWidth",.F.,312)
		oG2antt:SetProperty("BackColorSortBar",oG2antt:BackColor())
		oG2antt:ColumnAutoResize := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:Items():AllowCellValueToItemBar := .T.
		oG2antt:Columns:Item(2):SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
		oG2antt:Columns:Item(4):SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
		oG2antt:SortBarVisible := .T.
		oG2antt:SortBarCaption := "Drag a <b>column</b> header here to group by that column."
		oG2antt:AllowGroupBy := .T.
		oG2antt:Columns:Item(1):SortOrder := 1/*SortAscending*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1722
How can I highlight each group header ( not-subroup ), with a different background color (method 1)

PROCEDURE OnAddGroupItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Summary",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
		oItems:DefineSummaryBars(Item,"",-3,"")
RETURN

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Task",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
RETURN

PROCEDURE OnLayoutChanged(oG2antt)
	oG2antt:Refresh()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddGroupItem := {|Item| OnAddGroupItem(oG2antt,Item)} /*Occurs after a new Group Item has been inserted to Items collection.*/
		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/
		oG2antt:LayoutChanged := {|| OnLayoutChanged(oG2antt)} /*Occurs when column's position or column's size is changed.*/

		oG2antt:BeginUpdate()
		oG2antt:Chart():FirstVisibleDate := "09/01/1994"
		oG2antt:Chart():SetProperty("PaneWidth",.F.,312)
		oG2antt:SetProperty("BackColorSortBar",oG2antt:BackColor())
		oG2antt:ColumnAutoResize := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:Items():AllowCellValueToItemBar := .T.
		oG2antt:Columns:Item(2):SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
		oG2antt:Columns:Item(4):SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
		oG2antt:SortBarVisible := .T.
		oG2antt:SortBarCaption := "Drag a <b>column</b> header here to group by that column."
		oG2antt:AllowGroupBy := .T.
		oG2antt:Columns:Item(1):SortOrder := 1/*SortAscending*/
		oColumn := oG2antt:Columns():Add("Position")
			oColumn:FormatColumn := "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"
			oColumn:Visible := .F.
		oColumn1 := oG2antt:Columns():Add("Position")
			oColumn1:FormatColumn := "(1 rpos '') contains '.'"
			oColumn1:Visible := .F.
		oG2antt:ConditionalFormats():Add("%C14 = 0"):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 190,190,190 } )  , .F. ))
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1721
The BackColorAlternate displays each second row with a different background color. Is it possible to apply a different background color, for each sub-tree, ConditionalFormats, Add

PROCEDURE OnLayoutChanged(oG2antt)
	oG2antt:Refresh()
RETURN

PROCEDURE OnSort(oG2antt)
	oG2antt:Refresh()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1,oColumn2
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:LayoutChanged := {|| OnLayoutChanged(oG2antt)} /*Occurs when column's position or column's size is changed.*/
		oG2antt:Sort := {|| OnSort(oG2antt)} /*Fired when the control sorts a column.*/

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oG2antt:Columns():Add("P1")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oColumn1 := oG2antt:Columns():Add("P2")
			oColumn1:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn1:PartialCheck := .T.
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oColumn2 := oG2antt:Columns():Add("Position")
			oColumn2:FormatColumn := "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"
			oColumn2:Visible := .F.
		oG2antt:ConditionalFormats():Add("(%C2 mod 2) != 0"):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1720
The BackColorAlternate displays each second row with a different background color. Is it possible to apply a different background color, for 2nd, 3rd, 4th, row, and so on

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Task",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
RETURN

PROCEDURE OnLayoutChanged(oG2antt)
	oG2antt:Refresh()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/
		oG2antt:LayoutChanged := {|| OnLayoutChanged(oG2antt)} /*Occurs when column's position or column's size is changed.*/

		oG2antt:BeginUpdate()
		oG2antt:Chart():FirstVisibleDate := "09/01/1994"
		oG2antt:Chart():SetProperty("PaneWidth",.F.,312)
		oG2antt:ColumnAutoResize := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:Items():AllowCellValueToItemBar := .T.
		oG2antt:Columns:Item(2):SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
		oG2antt:Columns:Item(4):SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
		oG2antt:Columns:Item(1):SortOrder := 1/*SortAscending*/
		oColumn := oG2antt:Columns():Add("Position")
			oColumn:FormatColumn := "1 apos ''"
			oColumn:Visible := .F.
		oG2antt:ConditionalFormats():Add("(%C13 mod 5) = 1"):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oG2antt:ConditionalFormats():Add("(%C13 mod 5) = 2"):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 164,164,164 } )  , .F. ))
		oG2antt:ConditionalFormats():Add("(%C13 mod 5) = 3"):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 190,190,190 } )  , .F. ))
		oG2antt:ConditionalFormats():Add("(%C13 mod 5) = 4"):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1719
The BackColorAlternate displays each second row with a different background color. The question I have it is possible to apply a different background color for 3rd, 4th, row, and so on

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Task",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
RETURN

PROCEDURE OnLayoutChanged(oG2antt)
	oG2antt:Refresh()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/
		oG2antt:LayoutChanged := {|| OnLayoutChanged(oG2antt)} /*Occurs when column's position or column's size is changed.*/

		oG2antt:BeginUpdate()
		oG2antt:Chart():FirstVisibleDate := "09/01/1994"
		oG2antt:Chart():SetProperty("PaneWidth",.F.,312)
		oG2antt:ColumnAutoResize := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:Items():AllowCellValueToItemBar := .T.
		oG2antt:Columns:Item(2):SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
		oG2antt:Columns:Item(4):SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
		oG2antt:Columns:Item(1):SortOrder := 1/*SortAscending*/
		oColumn := oG2antt:Columns():Add("Position")
			oColumn:FormatColumn := "1 apos ''"
			oColumn:Visible := .F.
		oG2antt:ConditionalFormats():Add("(%C13 mod 4) = 0"):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1718
The BackColorAlternate looks fine for flat tables, but how about using it when displaying a hierarchy/tree, like grouping rows. The sample alternate colors for each group found

PROCEDURE OnAddGroupItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Summary",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
		oItems:DefineSummaryBars(Item,"",-3,"")
RETURN

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Task",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
RETURN

PROCEDURE OnLayoutChanged(oG2antt)
	oG2antt:Refresh()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddGroupItem := {|Item| OnAddGroupItem(oG2antt,Item)} /*Occurs after a new Group Item has been inserted to Items collection.*/
		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/
		oG2antt:LayoutChanged := {|| OnLayoutChanged(oG2antt)} /*Occurs when column's position or column's size is changed.*/

		oG2antt:BeginUpdate()
		oG2antt:Chart():FirstVisibleDate := "09/01/1994"
		oG2antt:Chart():SetProperty("PaneWidth",.F.,312)
		oG2antt:SetProperty("BackColorSortBar",oG2antt:BackColor())
		oG2antt:ColumnAutoResize := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:Items():AllowCellValueToItemBar := .T.
		oG2antt:Columns:Item(2):SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
		oG2antt:Columns:Item(4):SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
		oG2antt:SortBarVisible := .T.
		oG2antt:SortBarCaption := "Drag a <b>column</b> header here to group by that column."
		oG2antt:AllowGroupBy := .T.
		oG2antt:Columns:Item(1):SortOrder := 1/*SortAscending*/
		oColumn := oG2antt:Columns():Add("Position")
			oColumn:FormatColumn := "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"
			oColumn:Visible := .F.
		oG2antt:ConditionalFormats():Add("(%C13 mod 2) != 0"):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1717
How do I show the chart's labels in 24-hour clock format

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oLevel,oLevel1,oLevel2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 3
			oLevel := oChart:Level(0)
				oLevel:Label := "<%mmm%> <%d%>, <%yyyy%>"
				oLevel:Alignment := 17/*exHOutside+CenterAlignment*/
				oLevel:Unit := 4096/*exDay*/
			oLevel1 := oChart:Level(1)
				oLevel1:Label := "<b><%h%>:00</b>"
				oLevel1:Alignment := 1/*CenterAlignment*/
				oLevel1:Unit := 65536/*exHour*/
				oLevel1:DrawTickLines := -1/*exLevelDefaultLine*/
				oLevel1:DrawGridLines := .T.
			oLevel2 := oChart:Level(2)
				oLevel2:Label := "<%nn%>"
				oLevel2:Unit := 1048576/*exMinute*/
				oLevel2:Count := 15
			oChart:ScrollTo("01/01/2001 08:30:00",0)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1716
How do I show the chart's labels in 12-hour clock format

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oLevel,oLevel1,oLevel2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 3
			oLevel := oChart:Level(0)
				oLevel:Label := "<%mmm%> <%d%>, <%yyyy%>"
				oLevel:Alignment := 17/*exHOutside+CenterAlignment*/
				oLevel:Unit := 4096/*exDay*/
			oLevel1 := oChart:Level(1)
				oLevel1:Label := "<b><%h%>:00</b> <%AM/PM%>"
				oLevel1:Alignment := 1/*CenterAlignment*/
				oLevel1:Unit := 65536/*exHour*/
				oLevel1:DrawTickLines := -1/*exLevelDefaultLine*/
				oLevel1:DrawGridLines := .T.
			oLevel2 := oChart:Level(2)
				oLevel2:Label := "<%nn%>"
				oLevel2:Unit := 1048576/*exMinute*/
				oLevel2:Count := 15
			oChart:ScrollTo("01/01/2001 08:30:00",0)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1715
I would like to avoid manual typing in the date-cell because user often type wrong things (no decimal points and so on) and so the todays-date is generated for the cell. What can be done

PROCEDURE OnKeyPress(oG2antt,KeyAscii)
	DevOut( "if .Editying != 0 then" )
	DevOut( Transform(oG2antt:Editing(),"") )
	KeyAscii := 0
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:KeyPress := {|KeyAscii| OnKeyPress(oG2antt,KeyAscii)} /*Occurs when the user presses and releases an ANSI key.*/

		oG2antt:BeginUpdate()
		oColumns := oG2antt:Columns()
			oColumns:Add("Tasks")
			oColumn := oColumns:Add("Start")
				oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
				oColumn:Editor():EditType := 7/*DateType*/
			oColumn1 := oColumns:Add("End")
				oColumn1:SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
				oColumn1:Editor():EditType := 7/*DateType*/
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:AllowLinkBars := .T.
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,196)
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","09/21/2006","09/24/2006")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","09/22/2006","09/25/2006")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","09/23/2006","09/26/2006")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1714
When a Day, Week etc is clicked how can we make it centre/zoom the chart to cover all the bars

PROCEDURE OnOverviewZoom(oG2antt)
	LOCAL oChart
	oChart := oG2antt:Chart()
		oChart:ScrollTo("01/01/2001",1)
		DevOut( "Start" )
		DevOut( Transform(oChart:StartPrintDate(),"") )
		DevOut( "End" )
		DevOut( Transform(oChart:EndPrintDate(),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:OverviewZoom := {|| OnOverviewZoom(oG2antt)} /*Occurs once the user selects a new time scale unit in the overview zoom area.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:LevelCount := 2
			oChart:OverviewVisible := 2/*exOverviewShowAllVisible*/
			oChart:AllowOverviewZoom := 1/*exAlwaysZoom*/
			oChart:SetProperty("Label",16777216/*exSecond*/,"")
			oChart:SetProperty("Label",1048576/*exMinute*/,"")
			oChart:SetProperty("Label",65536/*exHour*/,"")
			oChart:UnitScale := 4096/*exDay*/
			oChart:ScrollTo("01/01/2001",1)
			oChart:MarkTimeZone("zone","01/01/2001","01/02/2001",10516548)
		oG2antt:Columns():Add("Default")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","12/15/2000","01/10/2001")
			oItems:AddBar(oItems:AddItem("Item 2"),"Task","01/01/2001","01/05/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1713
The first time we run the application, the day label headers looks different then pressing Week and then Day again on the control's overview part. How do we make to show the header in the same format

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:LevelCount := 2
			oChart:OverviewVisible := 2/*exOverviewShowAllVisible*/
			oChart:AllowOverviewZoom := 1/*exAlwaysZoom*/
			oChart:SetProperty("Label",16777216/*exSecond*/,"")
			oChart:SetProperty("Label",1048576/*exMinute*/,"")
			oChart:SetProperty("Label",65536/*exHour*/,"")
			oChart:UnitScale := 4096/*exDay*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1712
How to sort numerically by columns

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Numeric"):SortType := 1/*SortNumeric*/
		oItems := oG2antt:Items()
			oItems:AddItem(1)
			oItems:AddItem(2)
			oItems:AddItem(12)
			oItems:AddItem(22)
		oG2antt:Columns:Item(0):SortOrder := 1/*SortAscending*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1711
The control does not ensure the item to fit the control's client area once the user clicks the cell's button or check box. What can be done
PROCEDURE OnMouseDown(oG2antt,Button,Shift,X,Y)
	/*Items.EnsureVisibleItem(ItemFromPoint(-1,-1,c,hit))*/

RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseDown := {|Button,Shift,X,Y| OnMouseDown(oG2antt,Button,Shift,X,Y)} /*Occurs when the user presses a mouse button.*/

		oG2antt:BeginUpdate()
		oG2antt:TreeColumnIndex := -1
		oG2antt:SetProperty("SelForeColor",oG2antt:ForeColor())
		oColumn := oG2antt:Columns():Add("Buttons")
			oColumn:Alignment := 1/*CenterAlignment*/
			oColumn:SetProperty("Def",2/*exCellHasButton*/,.T.)
		oItems := oG2antt:Items()
			oItems:AddItem("Button A")
			oItems:AddItem("Button B")
			oItems:AddItem("Button C")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1710
How do I arrange the levels when the user changes the scale using the control's overview part

PROCEDURE OnOverviewZoom(oG2antt)
	LOCAL oChart
	DevOut( Transform(oG2antt:Chart:UnitScale(),"") )
	oG2antt:EnsureVisibleColumn(0)
	oChart := oG2antt:Chart()
		oChart:Level(0):DrawTickLines := 0/*exLevelNoLine*/
		oChart:ScrollTo("11/18/2015",1)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oLevel,oLevel1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:OverviewZoom := {|| OnOverviewZoom(oG2antt)} /*Occurs once the user selects a new time scale unit in the overview zoom area.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "11/18/2015"
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:LevelCount := 2
			oChart:DrawLevelSeparator := 2/*exLevelSolidLine*/
			oLevel := oChart:Level(0)
				oLevel:Alignment := 17/*exHOutside+CenterAlignment*/
				oLevel:DrawTickLines := 2/*exLevelSolidLine*/
				oLevel:SetProperty("BackColor",oG2antt:BackColor())
			oLevel1 := oChart:Level(1)
				oLevel1:DrawTickLines := 65/*exLevelMiddleLine+exLevelDotLine*/
				oLevel1:DrawTickLinesFrom(0,2/*exLevelSolidLine*/)
			oChart:OverviewVisible := 2/*exOverviewShowAllVisible*/
			oChart:AllowOverviewZoom := 1/*exAlwaysZoom*/
			oChart:UnitWidth := 24
			oChart:SetProperty("Label",16777216/*exSecond*/,"")
			oChart:SetProperty("Label",1048576/*exMinute*/,"")
			oChart:SetProperty("Label",65536/*exHour*/,"")
			oChart:SetProperty("Label",256/*exWeek*/,"")
			oChart:SetProperty("Label",4096/*exDay*/,"<|><%d%><|><%d3%>, <%m3%> <%d%>, '<%yy%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%><||><||>4096")
			oChart:UnitScale := 4096/*exDay*/
			oChart:ScrollTo(oChart:FirstVisibleDate(),1)
		oG2antt:Columns():Add("Default")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1709
I am using AllowGroupBy, the question is it is possible to add summary bars for child item, when user do grouping

PROCEDURE OnAddGroupItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Summary",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
		oItems:DefineSummaryBars(Item,"",-3,"")
RETURN

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Task",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddGroupItem := {|Item| OnAddGroupItem(oG2antt,Item)} /*Occurs after a new Group Item has been inserted to Items collection.*/
		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oG2antt:Chart():FirstVisibleDate := "09/01/1994"
		oG2antt:SetProperty("BackColorSortBar",oG2antt:BackColor())
		oG2antt:ColumnAutoResize := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:SortBarVisible := .T.
		oG2antt:SortBarCaption := "Drag a <b>column</b> header here to group by that column."
		oG2antt:AllowGroupBy := .T.
		oG2antt:Columns:Item(1):SortOrder := 1/*SortAscending*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1708
I noticed that when grouping on a field, its details are always expanded. Is it possible to show collapsed by default (method 3)

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Task",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oG2antt:Chart():FirstVisibleDate := "09/01/1994"
		oG2antt:SetProperty("BackColorSortBar",oG2antt:BackColor())
		oG2antt:ColumnAutoResize := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:SortBarVisible := .T.
		oG2antt:SortBarCaption := "Drag a <b>column</b> header here to group by that column."
		oG2antt:AllowGroupBy := .T.
		oG2antt:Chart():ShowCollapsedBars := .T.
		oG2antt:EndUpdate()
		oG2antt:Layout := "multiplesort=" + CHR(34) + "C1:1" + CHR(34) + ";collapse=" + CHR(34) + "0-9999" + CHR(34) + ""

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1707
I noticed that when grouping on a field, its details are always expanded. Is it possible to show collapsed by default (method 2)

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Task",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oG2antt:Chart():FirstVisibleDate := "09/01/1994"
		oG2antt:SetProperty("BackColorSortBar",oG2antt:BackColor())
		oG2antt:ColumnAutoResize := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:SortBarVisible := .T.
		oG2antt:SortBarCaption := "Drag a <b>column</b> header here to group by that column."
		oG2antt:AllowGroupBy := .T.
		oG2antt:Columns:Item(1):SortOrder := 1/*SortAscending*/
		oG2antt:EndUpdate()
		oG2antt:BeginUpdate()
		oG2antt:EnsureVisibleColumn(0)
		oG2antt:Items():SetProperty("ExpandItem",0,.F.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1706
I noticed that when grouping on a field, its details are always expanded. Is it possible to show collapsed by default (method 1)

PROCEDURE OnAddGroupItem(oG2antt,Item)
	oG2antt:Items():SetProperty("ExpandItem",Item,.F.)
RETURN

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Task",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddGroupItem := {|Item| OnAddGroupItem(oG2antt,Item)} /*Occurs after a new Group Item has been inserted to Items collection.*/
		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oG2antt:Chart():FirstVisibleDate := "09/01/1994"
		oG2antt:SetProperty("BackColorSortBar",oG2antt:BackColor())
		oG2antt:ColumnAutoResize := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:SortBarVisible := .T.
		oG2antt:SortBarCaption := "Drag a <b>column</b> header here to group by that column."
		oG2antt:AllowGroupBy := .T.
		oG2antt:Columns:Item(1):SortOrder := 1/*SortAscending*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1705
Is there a possibility to expand / collapse all groups (or group by group) at runtime with a method (equivalent to pressing the + or - button in the group header)

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Task",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oG2antt:Chart():FirstVisibleDate := "09/01/1994"
		oG2antt:SetProperty("BackColorSortBar",oG2antt:BackColor())
		oG2antt:ColumnAutoResize := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:SortBarVisible := .T.
		oG2antt:SortBarCaption := "Drag a <b>column</b> header here to group by that column."
		oG2antt:AllowGroupBy := .T.
		oG2antt:Columns:Item(1):SortOrder := 1/*SortAscending*/
		oG2antt:EndUpdate()
		oG2antt:EnsureVisibleColumn(0)
		oG2antt:BeginUpdate()
		oItems := oG2antt:Items()
			oItems:SetProperty("ExpandItem",oItems:RootItem(0),.F.)
			oItems:SetProperty("ExpandItem",oItems:RootItem(1),.F.)
			oItems:SetProperty("ExpandItem",oItems:RootItem(2),.F.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1704
Is there a possibility to expand / collapse all groups (or group by group) at runtime with a method (equivalent to pressing the + or - button in the group header)

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Task",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oG2antt:Chart():FirstVisibleDate := "09/01/1994"
		oG2antt:SetProperty("BackColorSortBar",oG2antt:BackColor())
		oG2antt:ColumnAutoResize := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:SortBarVisible := .T.
		oG2antt:SortBarCaption := "Drag a <b>column</b> header here to group by that column."
		oG2antt:AllowGroupBy := .T.
		oG2antt:Columns:Item(1):SortOrder := 1/*SortAscending*/
		oG2antt:EndUpdate()
		oG2antt:BeginUpdate()
		oG2antt:EnsureVisibleColumn(0)
		oItems := oG2antt:Items()
			oItems:SetProperty("ExpandItem",oItems:FirstVisibleItem(),.F.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1703
How can I move automatically a bar once another is moved ( non-working bars )

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h,h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:MarkSearchColumn := .F.
		oG2antt:OnResizeControl := 1/*exResizeChart*/
		oG2antt:Columns():Add("Tasks")
		oG2antt:Columns():Add("Start"):Visible := .F.
		oG2antt:Columns():Add("End"):Visible := .F.
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,64)
			oBar := oChart:Bars():Add("Task:Split")
				oBar:Shortcut := "TSplit"
				oBar:SetProperty("Def",20/*exBarKeepWorkingCount*/,.T.)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project")
			oItems:SetProperty("CellValue",h,1,"09/22/2006")
			oItems:SetProperty("CellValue",h,2,"10/03/2006")
			oItems:AddBar(h,"Summary",oItems:CellValue(h,1),oItems:CellValue(h,2))
			h1 := oItems:InsertItem(h,,"Task 1")
			oItems:SetProperty("CellValue",h1,1,oItems:CellValue(h,1))
			oItems:SetProperty("CellValue",h1,2,"09/26/2006")
			oItems:AddBar(h1,"TSplit",oItems:CellValue(h1,1),oItems:CellValue(h1,2))
			h2 := oItems:InsertItem(h,,"Task 2")
			oItems:SetProperty("CellValue",h2,1,oItems:CellValue(h1,2))
			oItems:SetProperty("CellValue",h2,2,"09/28/2006")
			oItems:AddBar(h2,"TSplit",oItems:CellValue(h2,1),oItems:CellValue(h2,2))
			oItems:AddLink("L1",h1,"",h2,"")
			h3 := oItems:InsertItem(h,,"Task 3")
			oItems:SetProperty("CellValue",h3,1,oItems:CellValue(h2,2))
			oItems:SetProperty("CellValue",h3,2,oItems:CellValue(h,2))
			oItems:AddBar(h3,"TSplit",oItems:CellValue(h3,1),oItems:CellValue(h3,2))
			oItems:AddLink("L2",h2,"",h3,"")
			oItems:GroupBars(h1,"",.F.,h2,"",.T.,7)
			oItems:GroupBars(h2,"",.F.,h3,"",.T.,7)
			oItems:DefineSummaryBars(h,"",h1,"")
			oItems:DefineSummaryBars(h,"",h2,"")
			oItems:DefineSummaryBars(h,"",h3,"")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ItemBold",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1702
How can I get notified once the user expands a column

PROCEDURE OnLayoutChanged(oG2antt)
	DevOut( "Column-Expanded" )
	DevOut( Transform(oG2antt:Columns:Item("C0"):Expanded(),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:LayoutChanged := {|| OnLayoutChanged(oG2antt)} /*Occurs when column's position or column's size is changed.*/

		oG2antt:BeginUpdate()
		oG2antt:ShowFocusRect := .F.
		oG2antt:ColumnAutoResize := .F.
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oColumns := oG2antt:Columns()
			oColumn := oColumns:Add("C0")
				oColumn:ExpandColumns := "0,1,2"
				oColumn:DisplayExpandButton := .T.
			oColumns:Add("C1")
			oColumns:Add("C2")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Cell 0.0")
			oItems:SetProperty("CellValue",h,1,"Cell 0.1")
			oItems:SetProperty("CellValue",h,2,"Cell 0.2")
			h := oItems:AddItem("Cell 1.0")
			oItems:SetProperty("CellValue",h,1,"Cell 1.1")
			oItems:SetProperty("CellValue",h,2,"Cell 1.2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1701
I am using expandable headers, the question is how I can display the column itself, not just the child columns

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ColumnAutoResize := .F.
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oColumns := oG2antt:Columns()
			oColumn := oColumns:Add("C0")
				oColumn:ExpandColumns := "0,1,2"
				oColumn:DisplayExpandButton := .T.
			oColumns:Add("C1")
			oColumns:Add("C2")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Cell 0.0")
			oItems:SetProperty("CellValue",h,1,"Cell 0.1")
			oItems:SetProperty("CellValue",h,2,"Cell 0.2")
			h := oItems:AddItem("Cell 1.0")
			oItems:SetProperty("CellValue",h,1,"Cell 1.1")
			oItems:SetProperty("CellValue",h,2,"Cell 1.2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN